From ec996f87b412c77e97fc56b30577dac84b763bee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
Date: Fri, 18 Feb 2011 05:39:14 +0100
Subject: [PATCH 1/2] Make sure to test for errno.h to define HAVE_ERRNO_H.

Without this patch, accton.o re-defines errno, but that will fail to link
because it won't be declared TLS, causing a conflict with glibc.

It is likely that the update applied to gnulib caused the test to be
dropped.
---
 config.h.in  |    3 +++
 configure    |    2 +-
 configure.ac |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/config.h.in b/config.h.in
index b0b96ed..2f68e5d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -209,6 +209,9 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
diff --git a/configure b/configure
index a64fc38..b5354e6 100755
--- a/configure
+++ b/configure
@@ -27698,7 +27698,7 @@ fi
 
 fi
 
-for ac_header in OS.h arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h utmp.h utmpx.h wchar.h
+for ac_header in OS.h arpa/inet.h errno.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h utmp.h utmpx.h wchar.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/configure.ac b/configure.ac
index 77e4611..ad9c041 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,7 @@ dnl
 AC_HEADER_TIME
 AC_HEADER_STDBOOL
 AC_HEADER_DIRENT
-AC_CHECK_HEADERS([OS.h arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h utmp.h utmpx.h wchar.h])
+AC_CHECK_HEADERS([OS.h arpa/inet.h errno.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h utmp.h utmpx.h wchar.h])
 
 dnl
 dnl find out where various programs reside on this system
-- 
1.7.4.1

