aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-04-11 00:28:05 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-04-11 00:47:36 -0400
commitc11ebe8974309a441ae49ae8116eccb17c61fa5f (patch)
treec4e539fd00d31db679efdf5eb4726be6fd8c8862
parentf04a13fd4b7c665dfecdeaef82e2ab628d6f402d (diff)
downloadspmc-c11ebe8974309a441ae49ae8116eccb17c61fa5f.tar.gz
Include protoypes for compat implementations
-rw-r--r--include/CMakeLists.txt1
-rw-r--r--include/compat.h14
-rw-r--r--include/spm.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index a7a1f72..68ca824 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -3,6 +3,7 @@ install(
${CMAKE_BINARY_DIR}/include/config.h
archive.h
checksum.h
+ compat.h
conf.h
environment.h
find.h
diff --git a/include/compat.h b/include/compat.h
new file mode 100644
index 0000000..b116f2c
--- /dev/null
+++ b/include/compat.h
@@ -0,0 +1,14 @@
+#ifndef SPM_COMPAT_H
+#define SPM_COMPAT_H
+
+#include "config.h"
+
+#ifndef HAVE_STRSEP
+char *strsep(char **sp, char *sep);
+#endif
+
+#ifndef HAVE_REALLOC_ARRAY
+void *reallocarray (void *__ptr, size_t __nmemb, size_t __size);
+#endif
+
+#endif //SPM_COMPAT_H
diff --git a/include/spm.h b/include/spm.h
index 895354f..1c2a806 100644
--- a/include/spm.h
+++ b/include/spm.h
@@ -26,6 +26,7 @@
#include <sys/utsname.h>
#endif
+#include "compat.h"
#include "package.h"
#include "str.h"
#include "strlist.h"