Revert "use __dead macro from sys/cdefs.h"
This partially reverts commit a7577667d673f49800e15461fe384817a1572eae.
The musl C library does not use an internal cdefs.h header. As a result,
the definitions in sys/cdefs.h have no effect. This breads the build as
follows:
In file included from adjfreq_linux.c:23:0:
../src/ntpd.h:448:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
__dead void fatal(const char *, ...)
^~~~
../src/ntpd.h:450:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
__dead void fatalx(const char *, ...)
^~~~
Refer the related musl FAQ about cdefs.h:
http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h
Keep the compiler attribute definition.
Remove also from noinst_HEADERS.
6 years ago |
|
- /*
- * Public domain
- * sys/types.h compatibility shim
- */
-
- #include_next <sys/types.h>
-
- #ifndef LIBCOMPAT_SYS_TYPES_H
- #define LIBCOMPAT_SYS_TYPES_H
-
- #include <stdint.h>
-
- #ifdef __MINGW32__
- #include <_bsd_types.h>
- #endif
-
- #if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead)
- #define __dead __attribute__((__noreturn__))
- #endif
-
- #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__)
- # define __bounded__(x, y, z)
- #endif
-
- #if !defined(HAVE_ATTRIBUTE__PACKED) && !defined(__packed)
- # define __packed __attribute__((__packed__))
- #endif
-
- /*
- * Define BSD-style unsigned bits types for systems that do not have them.
- */
- typedef uint8_t u_int8_t;
- typedef uint16_t u_int16_t;
- typedef uint32_t u_int32_t;
- typedef uint64_t u_int64_t;
-
- #ifndef BYTE_ORDER
- #include <machine/endian.h>
- #endif
-
- #endif
|