Adapt network headers for libc

This commit is contained in:
Mark
2020-05-31 22:21:44 +03:00
parent 954d5838ed
commit be92b3b137
3 changed files with 10 additions and 0 deletions
+5
View File
@@ -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
+3
View File
@@ -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
+2
View File
@@ -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;