summaryrefslogtreecommitdiff
blob: adaff55ebb167f90a00edf76c2f3d66d90a95602 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Fix build failure on gentoo's gcc:

In file included from ./inttypes.h:34:0,
 from ./stdint.h:65,
 from /usr/include/netinet/in.h:23,
 from /usr/include/netdb.h:27,
 from getaddrinfo.h:30,
 from canon-host.c:27:
     /usr/include/inttypes.h:297:1: error: unknown type name 'intmax_t'
     /usr/include/inttypes.h:297:26: error: unknown type name 'intmax_t'
     /usr/include/inttypes.h:300:27: error: unknown type name 'intmax_t'
     /usr/include/inttypes.h:300:45: error: unknown type name 'intmax_t'
diff --git a/lib/stdint_.h b/lib/stdint_.h
index adab4d7..3a8db19 100644
--- a/lib/stdint_.h
+++ b/lib/stdint_.h
@@ -43,7 +43,12 @@
      Include it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.  */
-# include @ABSOLUTE_STDINT_H@
+# include "config.h"
+# if HAVE_INCLUDE_NEXT
+#  include_next <stdint.h>
+# else
+#  include @ABSOLUTE_STDINT_H@
+# endif
 #endif
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,