- added patches fix build with gcc15 + units-gcc15.patch OBS-URL: https://build.opensuse.org/package/show/Education/units?expand=0&rev=50
39 lines
981 B
Diff
39 lines
981 B
Diff
Content-Type: text/x-diff; charset=us-ascii
|
|
Content-Disposition: attachment; filename="gcc-15.diff"
|
|
|
|
Fix non-C23-compatible prototypes.
|
|
|
|
--- units-2.24/parse.y 2024-11-08 21:47:09.000000000 +0000
|
|
+++ units-2.24/parse.y 2025-07-11 17:39:34.767021826 +0100
|
|
@@ -45,7 +45,8 @@
|
|
if (var) destroyunit(var); \
|
|
YYABORT; }
|
|
|
|
-int yylex();
|
|
+union UNITSSTYPE;
|
|
+int yylex(union UNITSSTYPE *lvalp, struct commtype *comm);
|
|
void yyerror(struct commtype *comm, char *);
|
|
|
|
#define MAXMEM 100
|
|
--- units-2.24/units.h 2024-11-15 02:24:47.000000000 +0000
|
|
+++ units-2.24/units.h 2025-07-11 17:33:15.111036898 +0100
|
|
@@ -50,13 +50,9 @@
|
|
char *malloc(), *realloc(), *getenv();
|
|
#endif
|
|
|
|
-#ifndef strchr
|
|
-# ifdef NO_STRCHR
|
|
-# define strchr(a,b) index((a),(b))
|
|
-# else
|
|
- char *strchr();
|
|
-# endif
|
|
-#endif /* !strchr */
|
|
+#ifdef NO_STRCHR
|
|
+# define strchr(a,b) index((a),(b))
|
|
+#endif
|
|
|
|
#define E_NORMAL 0
|
|
#define E_PARSE 1
|
|
|
|
|