summaryrefslogtreecommitdiff
path: root/archivers/rpm4/files/patch-system.h
blob: 9f118675dc2ba9fc9c8d84fde1c1000f0b89a9c8 (plain) (blame)
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
--- system.h.orig	2017-02-16 09:40:09 UTC
+++ system.h
@@ -41,6 +41,13 @@ char * stpncpy(char * dest, const char *
 #define	getenv(_s)	__secure_getenv(_s)
 #endif
 
+/* Add includes for missing libc prototypes */
+#include <ctype.h>
+#include <string.h>
+#include <libgen.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #else
@@ -87,7 +94,7 @@ char * stpncpy(char * dest, const char *
 #define _free(_ptr) rfree((_ptr))
 
 /* Retrofit glibc __progname */
-#if defined __GLIBC__ && __GLIBC__ >= 2
+#if defined __GLIBC__ && __GLIBC__ >= 2 || defined(__FreeBSD__)
 #if __GLIBC_MINOR__ >= 1
 #define	__progname	__assert_program_name
 #endif