$ make all
gcc -std=gnu99 -D_REENTERANT -m64 -O2 -flto -g0 -I/usr/include/nptl -I/usr/include/postgresql -lpq -lpthread -L/usr/lib/nptl -rdynamic -ldl -lrt -lm glonassd.c loadconfig.c todaemon.c logger.c worker.c lib.c forwarder.c -o glonassd
glonassd.c: In function ‘parceParams’:
glonassd.c:138:3: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
getcwd(stParams.start_path, FILENAME_MAX);
^
todaemon.c: In function ‘toDaemon’:
todaemon.c:76:2: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
chdir("/"); // stParams.start_path
^
todaemon.c:89:2: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
dup(tmp); / fd 1 = stdout /
^
todaemon.c:90:2: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
dup(tmp); / fd 2 = stderr /
^
logger.c: In function ‘logging’:
logger.c:49:22: warning: format not a string literal and no format arguments [-Wformat-security]
syslog(LOG_NOTICE, message);
^
logger.c:53:23: warning: format not a string literal and no format arguments [-Wformat-security]
syslog(LOG_NOTICE, message);
^
lib.c: In function ‘log2file’:
lib.c:325:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fHandle, content, content_size);
^
forwarder.c: In function ‘data_save’:
forwarder.c:130:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fHandle, &msg, sizeof(ST_FORWARD_MSG));
^
forwarder.c:132:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fHandle, content, content_size);
^
In function ‘open_alias’,
inlined from ‘log2file.part.0’ at lib.c:324:5:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
__open_missing_mode ();
^
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Makefile:19: ошибка выполнения рецепта для цели «glonassd»
make: *** [glonassd] Ошибка 1
Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-138-generic x86_64) gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609