freebsd-ports/math/readstat/files/patch-src_readstat__bits.h
Adriaan de Groot a46fb43e0e math/readstat: fix build on 14-CURRENT
In 14-CURRENT, the system compiler is more strict; it looks like

  In file included from src/readstat_bits.c:9:
    src/readstat_bits.h:10:29: error: a function declaration without
    a prototype is deprecated in all versions of C
    [-Werror,-Wstrict-prototypes]
  int machine_is_little_endian();

Apply the stricter flags in all builds, then fix the source so
that the prototypes are explicitly (void) -- this is a subtlely
of C semantics where (void) means "no arguments" and () means
"arguments unspecified" that rarely matters. Except now.
2023-02-19 14:07:52 +01:00

11 lines
348 B
C

--- src/readstat_bits.h.orig 2023-02-19 12:35:46 UTC
+++ src/readstat_bits.h
@@ -7,7 +7,7 @@
#undef READSTAT_MACHINE_IS_TWOS_COMPLEMENT
#define READSTAT_MACHINE_IS_TWOS_COMPLEMENT 0
-int machine_is_little_endian();
+int machine_is_little_endian(void);
char ones_to_twos_complement1(char num);
int16_t ones_to_twos_complement2(int16_t num);