Skip to content

Commit

Permalink
fixed missing includes for android
Browse files Browse the repository at this point in the history
  • Loading branch information
alba4k committed Dec 15, 2023
1 parent 6ee7e6b commit fcc6869
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ endif

ifeq ($(OS),Android)
INSTALLPATH := $(PREFIX)/bin
INCLUDE :=
endif

ifeq ($(KERNEL),Darwin)
Expand Down
5 changes: 5 additions & 0 deletions src/info/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#include <stdlib.h>
#include <stdbool.h>

#ifdef __ANDROID__
#include <unistd.h>
#include <sys/wait.h>
#endif // __ANDROID__

// get the machine name and eventually model version
int host(char *dest) {
#ifdef __APPLE__
Expand Down
5 changes: 5 additions & 0 deletions src/info/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#include <stdio.h>
#include <sys/utsname.h>

#ifdef __ANDROID__
#include <unistd.h>
#include <sys/wait.h>
#endif // __ANDROID__

// print the operating system name and architecture (uname -m)
int os(char *dest) {
struct utsname name;
Expand Down

0 comments on commit fcc6869

Please sign in to comment.