Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove musl references #2077

Merged
merged 1 commit into from Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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