Adapt network headers for libc
This commit is contained in:
@@ -2,3 +2,8 @@
|
||||
|
||||
#define NETCTL_SET_INADDR 0x0001
|
||||
#define NETCTL_GET_INADDR 0x0002
|
||||
|
||||
#if !defined(__KERNEL__)
|
||||
#include <stdint.h>
|
||||
int netctl(const char *iface, uint32_t cmd, void *arg);
|
||||
#endif
|
||||
|
||||
@@ -8,5 +8,8 @@
|
||||
#define YGG_REBOOT_MAGIC2 0x818471ED
|
||||
|
||||
#if defined(__KERNEL__)
|
||||
// TODO: move to kernel-only header
|
||||
void system_power_cmd(unsigned int cmd);
|
||||
#else
|
||||
int reboot(int magic1, int magic2, unsigned int cmd, void *arg);
|
||||
#endif
|
||||
|
||||
@@ -21,3 +21,5 @@ struct sockaddr {
|
||||
uint16_t sa_family;
|
||||
char __pad[SA_MAX_SIZE - sizeof(uint16_t)];
|
||||
} __attribute__((packed));
|
||||
|
||||
typedef size_t socklen_t;
|
||||
|
||||
Reference in New Issue
Block a user