The modified source based on reiserfscore/prints.c is included in files/prints.c to make it easily possible to apply fixes and create a new diff against the original. First test on a Void Linux musl box seem to indicate success. There is still a chance of the prints.c conversion missing some aspects.
26 lines
712 B
Diff
26 lines
712 B
Diff
Define _GNU_SOURCE for the declaration of loff_t in fcntl.h
|
|
Add missing typedefs for __compar_fn_t and compare_fn_t for
|
|
non __GLIBC__ case.
|
|
|
|
--- include/misc.h 2013-08-26 22:55:43.000000000 +0200
|
|
+++ include/misc.h 2015-09-03 19:44:24.636873860 +0200
|
|
@@ -12,6 +12,7 @@
|
|
# include "config.h"
|
|
#endif
|
|
|
|
+#define _GNU_SOURCE
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <sys/types.h>
|
|
@@ -34,6 +35,11 @@
|
|
|
|
#define INVAL_PTR (void *)-1
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+typedef int (*__compar_fn_t) (const void*, const void*);
|
|
+typedef __compar_fn_t comparison_fn_t;
|
|
+#endif
|
|
+
|
|
void check_memory_msg(void);
|
|
void die (char * fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
|
void * getmem (int size);
|