This patch fixes the following build/link error with musl version 1.1.24: LD smdev /toolchain/lib/gcc/x86_64-pc-linux-musl/9.2.0/../../../../x86_64-pc-linux-musl/bin/ld: smdev.o: in function `createdev': smdev.c:(.text+0xa11): undefined reference to `makedev' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:43: smdev] Error 1 make[1]: Leaving directory '/temporary/system/sources/smdev' make: *** [Makefile:31: binlib] Error 2
--- smdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smdev.c b/smdev.c index b774908..c5b0dde 100644 --- a/smdev.c +++ b/smdev.c @@ -2,6 +2,9 @@ #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/types.h> +#ifndef major +#include <sys/sysmacros.h> +#endif #include <linux/sockios.h> #include <linux/if_packet.h> -- 2.24.1
