You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cc --version
cc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cc -o inplace inplace.c
inplace.c: In function ‘main’:
inplace.c:206:9: warning: implicit declaration of function ‘asprintf’ [-Wimplicit-function-declaration]
if (asprintf(&tmp_fname, "%s-XXXXXX", fname) == -1)
^
After a bit of googling it seems that on some systems _GNU_SOURCE needs to be defined.
Compiling with -D _GNU_SOURCE or adding the following declaration at the top of the file fixes this.:
#ifndef_GNU_SOURCE#define_GNU_SOURCE 1
#endif
The text was updated successfully, but these errors were encountered:
After a bit of googling it seems that on some systems
_GNU_SOURCE
needs to be defined.Compiling with
-D _GNU_SOURCE
or adding the following declaration at the top of the file fixes this.:The text was updated successfully, but these errors were encountered: