Sfoglia il codice sorgente

Do not include unneeded <sys/cdefs.h>

The md5 module imported from OpenBSD had non-standard __attribute__
attached to function declarations. As those were removed on import,
remove the now unused include too.

The start-stop-daemon program uses the dpkg provided C macro
definitions so there's no need for <sys/cdefs.h> there either, even
if its inclusion is conditional.

Reported-by: Andrew Stormont <andrew.stormont@nexenta.com>
Guillem Jover 14 anni fa
parent
commit
68a6242098
3 ha cambiato i file con 1 aggiunte e 7 eliminazioni
  1. 1 1
      configure.ac
  2. 0 2
      lib/dpkg/md5.h
  3. 0 4
      utils/start-stop-daemon.c

+ 1 - 1
configure.ac

@@ -62,7 +62,7 @@ fi
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([stddef.h error.h locale.h libintl.h kvm.h \
-                  sys/cdefs.h sys/syscall.h linux/fiemap.h])
+                  sys/syscall.h linux/fiemap.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_BIGENDIAN

+ 0 - 2
lib/dpkg/md5.h

@@ -25,8 +25,6 @@ typedef struct MD5Context {
 	u_int8_t buffer[MD5_BLOCK_LENGTH];	/* input buffer */
 } MD5_CTX;
 
-#include <sys/cdefs.h>
-
 void	 MD5Init(MD5_CTX *);
 void	 MD5Update(MD5_CTX *, const u_int8_t *, size_t);
 void	 MD5Pad(MD5_CTX *);

+ 0 - 4
utils/start-stop-daemon.c

@@ -45,10 +45,6 @@
 
 #define MIN_POLL_INTERVAL 20000 /* µs */
 
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
 #ifdef HAVE_SYS_SYSCALL_H
 #include <sys/syscall.h>
 #endif