Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
# make
cc -O -ansi -pedantic -U__STRICT_ANSI__ -Wall -Wpointer-arith -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wno-long-long -c mini_httpd.c
mini_httpd.c:102:19: error: conflicting types for ‘int64_t’
typedef long long int64_t;
^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:156:0,
from /usr/include/stdlib.h:394,
from mini_httpd.c:32:
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: previous declaration of ‘int64_t’ was here
typedef __int64_t int64_t;
^~~~~~~
mini_httpd.c: In function ‘main’:
mini_httpd.c:497:31: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "%s - %m", logfile );
^
mini_httpd.c:513:43: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_WARNING, "fchown logfile - %m" );
^
mini_httpd.c:598:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "fork - %m" );
^
mini_httpd.c:625:31: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "%s - %m", pidfile );
^
mini_httpd.c:640:7: warning: implicit declaration of function ‘setgroups’; did you mean ‘getgroups’? [-Wimplicit-function-declaration]
if ( setgroups( 0, (gid_t*) 0 ) < 0 )
^~~~~~~~~
getgroups
mini_httpd.c:642:38: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "setgroups - %m" );
^
mini_httpd.c:649:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "setgid - %m" );
^
mini_httpd.c:654:7: warning: implicit declaration of function ‘initgroups’; did you mean ‘getgroups’? [-Wimplicit-function-declaration]
if ( initgroups( user, gid ) < 0 )
^~~~~~~~~~
getgroups
mini_httpd.c:656:38: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_ERR, "initgroups - %m" );
^
mini_httpd.c:670:34: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "chdir - %m" );
^
mini_httpd.c:686:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "chroot - %m" );
^
mini_httpd.c:715:41: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "chroot chdir - %m" );
^
mini_httpd.c:727:43: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "data_dir chdir - %m" );
^
mini_httpd.c:739:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "setuid - %m" );
^
mini_httpd.c:819:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "select - %m" );
^
mini_httpd.c:844:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "accept - %m" );
^
mini_httpd.c:853:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "fork - %m" );
^
mini_httpd.c: In function ‘read_config’:
mini_httpd.c:897:27: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "%s - %m", filename );
^
mini_httpd.c: In function ‘initialize_listen_socket’:
mini_httpd.c:1097:37: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "socket %.80s - %m", ntoa( usaP ) );
^
mini_httpd.c:1107:48: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "setsockopt SO_REUSEADDR - %m" );
^
mini_httpd.c:1114:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "bind %.80s - %m", ntoa( usaP ) );
^
mini_httpd.c:1121:31: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "listen - %m" );
^
mini_httpd.c: In function ‘auth_check’:
mini_httpd.c:2383:61: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
LOG_ERR, "%.80s auth file %.80s could not be opened - %m",
^
mini_httpd.c:2406:19: warning: implicit declaration of function ‘crypt’; did you mean ‘creat’? [-Wimplicit-function-declaration]
if ( strcmp( crypt( authpass, cryp ), cryp ) == 0 )
^~~~~
creat
mini_httpd.c:2406:19: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast [-Wint-conversion]
In file included from mini_httpd.c:35:0:
/usr/include/string.h:136:12: note: expected ‘const char *’ but argument is of type ‘int’
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
mini_httpd.c: In function ‘send_via_sendfile’:
mini_httpd.c:2812:14: warning: implicit declaration of function ‘my_sendfile’ [-Wimplicit-function-declaration]
ssize_t r = my_sendfile( fd, s, off, buf_size );
^~~~~~~~~~~
mini_httpd.c: In function ‘handle_sigchld’:
mini_httpd.c:3315:35: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_ERR, "child wait - %m" );
^
mini_httpd.c: In function ‘re_open_logfile’:
mini_httpd.c:3341:31: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog( LOG_CRIT, "%s - %m", logfile );
^
mini_httpd.c: In function ‘main’:
mini_httpd.c:677:5: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
(void) getcwd( cwd, sizeof(cwd) - 1 );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mini_httpd.c: In function ‘do_cgi’:
mini_httpd.c:1925:5: warning: ignoring return value of ‘nice’, declared with attribute warn_unused_result [-Wunused-result]
(void) nice( CGI_NICE );
^~~~~~~~~~~~~~~~~~~~~~~
mini_httpd.c:1938:2: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
(void) chdir( directory ); /* ignore errors */
^~~~~~~~~~~~~~~~~~~~~~~~~
mini_httpd.c: In function ‘post_post_garbage_hack’:
mini_httpd.c:2035:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
(void) read( conn_fd, buf, sizeof(buf) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
mini_httpd.c:2797:1: warning: ‘send_via_sendfile’ defined but not used [-Wunused-function]
send_via_sendfile( int fd, int s, off_t size )
^~~~~~~~~~~~~~~~~
Makefile:37: recipe for target 'mini_httpd.o' failed
make: *** [mini_httpd.o] Error 1
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.