From 6f09693776abb8cd7aebc7a62f704c80c0058c59 Mon Sep 17 00:00:00 2001 From: toni Date: Fri, 6 Jan 2017 19:31:35 +0100 Subject: fixed compile error if compiling with mips-gcc --- dummyshell.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dummyshell.c b/dummyshell.c index 28c64f3..835fc27 100644 --- a/dummyshell.c +++ b/dummyshell.c @@ -1,5 +1,5 @@ /* - * build with: gcc -Wall -O2 -D_HAS_MSG=1 -D_HAS_HOSTENT=1 -D_HAS_SIGNAL=1 -D_HAS_UTMP=1 -D_HAS_SYSINFO -ffunction-sections -fdata-sections -ffast-math -fomit-frame-pointer dummyshell.c -o dummyshell + * build with: gcc -Wall -O2 -D_GNU_SOURCE=1 -D_HAS_CMD=1 -D_HAS_MSG=1 -D_HAS_HOSTENT=1 -D_HAS_SIGNAL=1 -D_HAS_UTMP=1 -D_HAS_SYSINFO -ffunction-sections -fdata-sections -ffast-math -fomit-frame-pointer dummyshell.c -o dummyshell * strip -s dummyshell */ @@ -10,8 +10,7 @@ #include #include #include /* isprint(...) */ -#include /* ioctl(...) */ -#include +#include /* ioctl(...) */ #include /* UINT8_MAX */ #include /* memset(...) */ #include @@ -118,7 +117,7 @@ static void print_cmds(void) size_t idx = 0; printf("\33[2K\r[COMMANDS]\n"); while ( cmds[idx++].path != NULL ) { - printf(" [%lu] %s\n", idx-1, ( cmds[idx-1].name != NULL ? cmds[idx-1].name : "unknown" )); + printf(" [%lu] %s\n", (unsigned long int)idx-1, ( cmds[idx-1].name != NULL ? cmds[idx-1].name : "unknown" )); } } -- cgit v1.2.3