diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2011-07-03 18:51:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2011-07-03 18:51:02 +0000 |
commit | b27e467a0f3fbb2ba1e30b32a18174f170b76ef2 (patch) | |
tree | 069f384a9ef9f8857a52d9cdf82b44ad09d73aba /include/dirent.h | |
parent | 2b26c94b023e817134a575613754dbb9ecc19518 (diff) |
As pointed out by Richard Guenther our definition
of NULL was incorrect for c++ compilers that aren't
gcc (or pretend to be gcc like clang).
ok miod@
Diffstat (limited to 'include/dirent.h')
-rw-r--r-- | include/dirent.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h index ef1c1bafc95..d91c2658527 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dirent.h,v 1.21 2011/04/06 11:39:42 miod Exp $ */ +/* $OpenBSD: dirent.h,v 1.22 2011/07/03 18:51:01 jsg Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- @@ -84,6 +84,8 @@ typedef struct _dirdesc { #ifndef NULL #ifdef __GNUG__ #define NULL __null +#elif defined(__cplusplus) +#define NULL 0L #else #define NULL ((void *)0) #endif /* __GNUG__ */ |