Skip to content

Commit

Permalink
Fixing the sysinfo conflict between toolchains, pre-defining the miss…
Browse files Browse the repository at this point in the history
…ing asprintf on uclibc
  • Loading branch information
wberube committed Aug 8, 2024
1 parent d7e4b62 commit bc5f64a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
#include <stdio.h>
#include <sys/utsname.h>

#ifdef __UCLIBC__
extern int asprintf(char **restrict strp, const char *restrict fmt, ...);
#endif

int start_mdns();
void stop_mdns();
6 changes: 5 additions & 1 deletion src/region.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@

#include <ifaddrs.h>
#include <linux/if_link.h>
#include <linux/version.h>
#include <pthread.h>
#include <time.h>

#ifdef __UCLIBC__
#include <sys/sysinfo.h>
extern int asprintf(char **restrict strp, const char *restrict fmt, ...);
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
#include <sys/sysinfo.h>
#else
#include <linux/sysinfo.h>
#endif
Expand Down

0 comments on commit bc5f64a

Please sign in to comment.