Skip to content

Commit

Permalink
Remove musl references (#2077)
Browse files Browse the repository at this point in the history
`libkmod` relies of `libc`, which means we no longer can build with
`musl`.
Remove reference to it.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Mar 22, 2024
1 parent def0c29 commit 4c5bf0d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions init/init.c
Expand Up @@ -4,6 +4,7 @@
#include <ftw.h>
#include <getopt.h>
#include <libkmod.h>
#include <linux/random.h> // RNDADDENTROPY
#include <net/if.h>
#include <netinet/ip.h>
#include <signal.h>
Expand All @@ -19,8 +20,8 @@
#include <sys/utsname.h>
#include <sys/wait.h>
#include <unistd.h>
#include "../vsockexec/vsock.h"

#include "../vsockexec/vsock.h"

#ifdef DEBUG
#ifdef USE_TCP
Expand Down Expand Up @@ -53,12 +54,6 @@ static int opentcp(unsigned short port)
}
#endif

// musl-gcc doesn't use headers in /usr/include, so it can't find
// linux/random.h which is where RNDADDENTROPY is defined. We only need this
// single definition from linux/random.h, so we just duplicate it here as a
// workaround.
#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )

#define DEFAULT_PATH_ENV "PATH=/sbin:/usr/sbin:/bin:/usr/bin"
#define OPEN_FDS 15

Expand Down

0 comments on commit 4c5bf0d

Please sign in to comment.