mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 22:16:21 +00:00
Define POSIX macro to have strdup
98c38dc6d6
sets C99 as standard.
strdup() is not part of C99.
For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.
We should take more care to use glib functions whenever possible.
Regards https://github.com/profanity-im/profanity/issues/1357
This commit is contained in:
@@ -149,13 +149,13 @@ log_init(log_level_t filter, char *log_file)
|
||||
level_filter = filter;
|
||||
tz = g_time_zone_new_local();
|
||||
|
||||
char *lf;
|
||||
gchar *lf;
|
||||
lf = files_get_log_file(log_file);
|
||||
|
||||
logp = fopen(lf, "a");
|
||||
g_chmod(lf, S_IRUSR | S_IWUSR);
|
||||
mainlogfile = g_string_new(lf);
|
||||
free(lf);
|
||||
g_free(lf);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user