-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
I'm getting the following compilation error on Archlinux with gcc-15:
read_boulder.c:106:15: error: conflicting types for ‘strtod’; have ‘double(void)’
106 | extern double strtod();
| ^~~~~~
In file included from read_boulder.c:45:
/usr/include/stdlib.h:122:15: note: previous declaration of ‘strtod’ with type ‘double(const char *, char **)’
122 | extern double strtod (const char *__restrict __nptr,
| ^~~~~~
read_boulder.c: In function ‘parse_double’:
read_boulder.c:1001:12: error: too many arguments to function ‘strtod’; expected 0, have 2
1001 | *out = strtod(datum, &nptr);
| ^~~~~~ ~~~~~
read_boulder.c:106:15: note: declared here
106 | extern double strtod();
| ^~~~~~
make: *** [Makefile:225: read_boulder.o] Error 1This is the same as this Debian Bug, with the same solution: remove the old compatibility declaration.
--- a/src/read_boulder.c
+++ b/src/read_boulder.c
@@ -99,14 +99,6 @@
static const char *pr_program_name = "TMP";
/*
- * Hack to support old SunOS headers. (We do not try to declare _all_
- * undeclared functions; only those with non-int return types.)
- */
-#ifndef __cplusplus
-extern double strtod();
-#endif
-
-/*
* See read_boulder.h for description.
*/
#define COMPARE(TAG) (!strncmp(s, TAG, tag_len) \Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels