Fedora Rawhide builds fail without stdlib include

Implicit declarations of malloc, free, atoi, and others are considered an
error now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2023-12-03 13:59:21 -08:00
parent 8bf8f18962
commit 8e212c0858
12 changed files with 12 additions and 0 deletions

View file

@ -17,6 +17,7 @@
* restore_deco_state() * restore_deco_state()
* dump_tissues() * dump_tissues()
*/ */
#include <stdlib.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>

View file

@ -10,6 +10,7 @@
#include "picture.h" #include "picture.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View file

@ -4,6 +4,7 @@
#pragma clang diagnostic ignored "-Wmissing-field-initializers" #pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif #endif
#include <stdlib.h>
#include "ssrf.h" #include "ssrf.h"
#include "dive.h" #include "dive.h"
#include "divesite.h" #include "divesite.h"

View file

@ -4,6 +4,7 @@
#pragma clang diagnostic ignored "-Wmissing-field-initializers" #pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif #endif
#include <stdlib.h>
#include "qthelper.h" #include "qthelper.h"
#include "ssrf.h" #include "ssrf.h"
#include "dive.h" #include "dive.h"

View file

@ -6,6 +6,7 @@
#include "ssrf.h" #include "ssrf.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>

View file

@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <string.h> #include <string.h>
#include <stdlib.h>
#include "ssrf.h" #include "ssrf.h"
#include "divesite.h" #include "divesite.h"

View file

@ -5,6 +5,7 @@
* *
* (c) Dirk Hohndel 2013 * (c) Dirk Hohndel 2013
*/ */
#include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>

View file

@ -9,6 +9,7 @@
#include <unistd.h> #include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include "dive.h" #include "dive.h"
#include "deco.h" #include "deco.h"
#include "units.h" #include "units.h"

View file

@ -7,6 +7,7 @@
#include <limits.h> #include <limits.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h>
#include "dive.h" #include "dive.h"
#include "divelist.h" #include "divelist.h"

View file

@ -11,6 +11,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
extern void show_computer_list(); extern void show_computer_list();

View file

@ -20,6 +20,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <stdlib.h>
#include "gettext.h" #include "gettext.h"
#include "libdivecomputer.h" #include "libdivecomputer.h"

View file

@ -9,6 +9,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h>
#include "gettext.h" #include "gettext.h"