diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | openbsd-compat/sys-tree.h | 5 |
3 files changed, 21 insertions, 2 deletions
@@ -1,6 +1,8 @@ | |||
1 | 20130208 | 1 | 20130208 |
2 | - (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer; | 2 | - (djm) [contrib/redhat/sshd.init] treat RETVAL as an integer; |
3 | patch from Iain Morgan in bz#2059 | 3 | patch from Iain Morgan in bz#2059 |
4 | - (dtucker) [configure.ac openbsd-compat/sys-tree.h] Test if compiler allows | ||
5 | __attribute__ on return values and work around if necessary. ok djm@ | ||
4 | 6 | ||
5 | 20130207 | 7 | 20130207 |
6 | - (djm) [configure.ac] Don't probe seccomp capability of running kernel | 8 | - (djm) [configure.ac] Don't probe seccomp capability of running kernel |
diff --git a/configure.ac b/configure.ac index f61106441..6df09e210 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.501 2013/02/06 23:11:05 djm Exp $ | 1 | # $Id: configure.ac,v 1.502 2013/02/08 00:50:09 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.501 $) | 18 | AC_REVISION($Revision: 1.502 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -238,6 +238,18 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then | |||
238 | fi | 238 | fi |
239 | fi | 239 | fi |
240 | 240 | ||
241 | AC_MSG_CHECKING([if compiler allows __attribute__ on return types]) | ||
242 | AC_COMPILE_IFELSE( | ||
243 | [AC_LANG_PROGRAM([[ | ||
244 | #include <stdlib.h> | ||
245 | __attribute__((__unused__)) static void foo(void){return;}]], | ||
246 | [[ exit(0); ]])], | ||
247 | [ AC_MSG_RESULT([yes]) ], | ||
248 | [ AC_MSG_RESULT([no]) | ||
249 | AC_DEFINE(NO_ATTRIBUTE_ON_RETURN_TYPE, 1, | ||
250 | [compiler does not accept __attribute__ on return types]) ] | ||
251 | ) | ||
252 | |||
241 | if test "x$no_attrib_nonnull" != "x1" ; then | 253 | if test "x$no_attrib_nonnull" != "x1" ; then |
242 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) | 254 | AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull]) |
243 | fi | 255 | fi |
diff --git a/openbsd-compat/sys-tree.h b/openbsd-compat/sys-tree.h index 058fa3b23..7f7546ecd 100644 --- a/openbsd-compat/sys-tree.h +++ b/openbsd-compat/sys-tree.h | |||
@@ -26,6 +26,11 @@ | |||
26 | 26 | ||
27 | /* OPENBSD ORIGINAL: sys/sys/tree.h */ | 27 | /* OPENBSD ORIGINAL: sys/sys/tree.h */ |
28 | 28 | ||
29 | #include "config.h" | ||
30 | #ifdef NO_ATTRIBUTE_ON_RETURN_TYPE | ||
31 | # define __attribute__(x) | ||
32 | #endif | ||
33 | |||
29 | #ifndef _SYS_TREE_H_ | 34 | #ifndef _SYS_TREE_H_ |
30 | #define _SYS_TREE_H_ | 35 | #define _SYS_TREE_H_ |
31 | 36 | ||