void-packages/srcpkgs/reiserfsprogs/patches/musl-__compar_fn_t.patch

19 lines
496 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.
--- a/include/misc.h
+++ b/include/misc.h
@@ -35,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(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
void *getmem(int size);