Skip to content

Build failure in C23 mode #566

Description

@ryandesign

Building sysbench fails when the compiler is in C23 mode.

autoconf 2.73 puts the compiler into C23 mode by default if the compiler supports it.

crc32.c:194:29: error: unknown type name 'crc'
  194 | unsigned long ZEXPORT crc32(crc, buf, len)
      |                             ^
crc32.c:194:34: error: unknown type name 'buf'
  194 | unsigned long ZEXPORT crc32(crc, buf, len)
      |                                  ^
crc32.c:194:39: error: unknown type name 'len'
  194 | unsigned long ZEXPORT crc32(crc, buf, len)
      |                                       ^
crc32.c:194:43: error: expected ';' after top level declarator
  194 | unsigned long ZEXPORT crc32(crc, buf, len)
      |                                           ^
      |                                           ;
crc32.c:198:1: error: expected identifier or '('
  198 | {
      | ^

Old-style K&R function definitions are no longer supported:

unsigned long ZEXPORT crc32(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
unsigned len;
{

The upstream version of crc32.c has fixed these problems already:

https://github.com/madler/zlib/commits/develop/crc32.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions