Skip to content

Instantly share code, notes, and snippets.

@twilligon
Created April 8, 2018 05:29
Show Gist options
  • Select an option

  • Save twilligon/a83cc94e027e4ef8da53d4d136a1c316 to your computer and use it in GitHub Desktop.

Select an option

Save twilligon/a83cc94e027e4ef8da53d4d136a1c316 to your computer and use it in GitHub Desktop.
Patch for gentoo clang/musl sys-process/procps
diff --git a/proc/numa.h b/proc/numa.h
index c198d9d..1b2b4eb 100644
--- a/proc/numa.h
+++ b/proc/numa.h
@@ -22,7 +22,9 @@
#include <features.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
void numa_init (void);
void numa_uninit (void);
@@ -30,6 +32,8 @@ void numa_uninit (void);
extern int (*numa_max_node) (void);
extern int (*numa_node_of_cpu) (int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/procio.c b/procio.c
index 479243e..485311e 100644
--- a/procio.c
+++ b/procio.c
@@ -24,7 +24,8 @@
#endif
#include <errno.h>
#include <fcntl.h>
-#include <libio.h>
+//#include <libio.h>
+#define NULL 0
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment