diff options
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index bc9888e31..ce6abae82 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: openbsd-compat.h,v 1.61 2014/02/04 00:18:23 djm Exp $ */ | 1 | /* $Id: openbsd-compat.h,v 1.62 2014/09/30 23:43:08 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999-2003 Damien Miller. All rights reserved. | 4 | * Copyright (c) 1999-2003 Damien Miller. All rights reserved. |
@@ -268,4 +268,20 @@ char *shadow_pw(struct passwd *pw); | |||
268 | #include "port-tun.h" | 268 | #include "port-tun.h" |
269 | #include "port-uw.h" | 269 | #include "port-uw.h" |
270 | 270 | ||
271 | /* _FORTIFY_SOURCE breaks FD_ISSET(n)/FD_SET(n) for n > FD_SETSIZE. Avoid. */ | ||
272 | #if defined(HAVE_FEATURES_H) && defined(_FORTIFY_SOURCE) | ||
273 | # include <features.h> | ||
274 | # if defined(__GNU_LIBRARY__) && defined(__GLIBC_PREREQ) | ||
275 | # if __GLIBC_PREREQ(2, 15) && (_FORTIFY_SOURCE > 0) | ||
276 | # include <sys/socket.h> /* Ensure include guard is defined */ | ||
277 | # undef FD_SET | ||
278 | # undef FD_ISSET | ||
279 | # define FD_SET(n, set) kludge_FD_SET(n, set) | ||
280 | # define FD_ISSET(n, set) kludge_FD_ISSET(n, set) | ||
281 | void kludge_FD_SET(int, fd_set *); | ||
282 | int kludge_FD_ISSET(int, fd_set *); | ||
283 | # endif /* __GLIBC_PREREQ(2, 15) && (_FORTIFY_SOURCE > 0) */ | ||
284 | # endif /* __GNU_LIBRARY__ && __GLIBC_PREREQ */ | ||
285 | #endif /* HAVE_FEATURES_H && _FORTIFY_SOURCE */ | ||
286 | |||
271 | #endif /* _OPENBSD_COMPAT_H */ | 287 | #endif /* _OPENBSD_COMPAT_H */ |