]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
compat: add compat.h header to get forward declarations
authorVincent Bernat <vincent@bernat.ch>
Mon, 4 Dec 2023 15:52:45 +0000 (16:52 +0100)
committerVincent Bernat <vincent@bernat.ch>
Mon, 4 Dec 2023 15:52:45 +0000 (16:52 +0100)
src/compat/asprintf.c
src/compat/daemon.c
src/compat/getline.c
src/compat/malloc.c
src/compat/realloc.c
src/compat/setproctitle.c
src/compat/strlcpy.c
src/compat/strndup.c
src/compat/strnlen.c
src/compat/strtonum.c

index e92e0e91fad51e52f8265f413b07409226fe2079..58c5daefee484d1d6f87fc7a99438b01368364e0 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <limits.h>
+#include "compat.h"
 
 #define INIT_SZ 128
 
index 4452fd965873b182440d23c9d8f4e270bda42627..5b7f98049b9147880d4c6faa71116fe41b2a5f14 100644 (file)
@@ -34,6 +34,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include "compat.h"
 
 int
 daemon(int nochdir, int noclose)
index beb2d7df272cfb4a935e193d2e6820f743b2c417..a3e6047a6228e48078eaf8e71b921b239ff07a99 100644 (file)
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "compat.h"
 
 #define MINBUF 128
 
index 7930282b9e391eaffc891d6edf4f9b48e8e757e4..0c8bb2c81a27067e0a0ed31d43876040a1bf8231 100644 (file)
@@ -4,6 +4,7 @@
 #undef malloc
 #include <stdlib.h>
 #include <sys/types.h>
+#include "compat.h"
 
 /* Allocate an N-byte block of memory from the heap.
    If N is zero, allocate a 1-byte block.  */
index c6aa351ca9df8dfe496fa5127acef0fdff58e8ca..4d74064be3f78d87c59e1ba63a57db2a28182eac 100644 (file)
@@ -4,6 +4,7 @@
 #undef realloc
 #include <stdlib.h>
 #include <sys/types.h>
+#include "compat.h"
 
 /* Reallocate an N-byte block of memory from the heap.
    If N is zero, allocate a 1-byte block.  */
index cc8e6384c00bdc96660f05bb2c6494b1a1ca095d..c5e40ecf52c8208ae3f4b156a95de61111f770c7 100644 (file)
@@ -1,5 +1,7 @@
 /* -*- mode: c; c-file-style: "openbsd" -*- */
 
+#include "compat.h"
+
 void
 setproctitle(const char *fmt, ...)
 {
index 669b90e19f802f34dddc75734806211bf0ac0939..dda982f8615b1e638032dd54a061a9f09a0c5d8d 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <sys/types.h>
 #include <string.h>
+#include "compat.h"
 
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
index bc5b821398e0864038503db72822a53c64ca5ea1..1db7069b80c4b3b8729f302d94ce02c03182167e 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include "compat.h"
 
 /*
  * Similar to `strdup()` but copies at most n bytes.
index 9da0fe5783d655211e3f97178693f741ac21c58f..07db4a44a27725cf0377d8580d0f93baa8b3250b 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- mode: c; c-file-style: "openbsd" -*- */
 
 #include <string.h>
+#include "compat.h"
 
 /*
  * Determine the length of a fixed-size string. This is really a
index 78aa8051ffbd370c31b6bc5e82a13580fe7068d3..aed36b9f20c9e35dad8477f14ab4ad53b1b2be23 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <stdlib.h>
+#include "compat.h"
 
 #define INVALID 1
 #define TOOSMALL 2