AC_SEARCH_LIBS([clock_gettime], [rt], [CLOCK_GETTIME_LIBS="-lrt"])
AC_SUBST([CLOCK_GETTIME_LIBS])
LIBS="$saved_LIBS"
- ]
+ ],
+ [*-musl], [
+ # Upstream refuses to define this, we will do it ourselves then.
+ AC_DEFINE([__MUSL__], [1], [Define to 1 if we are building for musl])
+ ],
)
# Checks for header files.
/*
- * Copyright © 2011, 2013 Guillem Jover
+ * Copyright © 2011, 2013, 2017 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
return fopencookie(cookiewrap, mode, funcswrap);
}
+#elif defined(__MUSL__)
+/*
+ * This is unimplementable on musl based systems, and upstream has stated
+ * they will not add the needed support to implement it. Just ignore this
+ * interface there, as it has never been provided anyway.
+ */
#else
-#error "Function funopen() needs to be ported."
+#error "Function funopen() needs to be ported or disabled."
#endif
LIBBSD_0.7 {
getbsize;
+ /* This symbol might not be present on some specific systems, such
+ * as musl based ones. It might need to be removed on SOVERSION bump,
+ * as it cannot be portabily implemented everywhere. */
funopen;
reallocarray;