Bug#1039439: berusky: FTBFS with libsdl1.2-compat-dev: did you forget to '#include <cstddef>'?
Simon McVittie
smcv at debian.org
Sun Jun 25 23:55:55 BST 2023
Source: berusky
Version: 1.7.2-2
Severity: important
Tags: ftbfs trixie sid
I tried recompiling berusky with libsdl1.2-compat-dev instead of
libsdl1.2-dev, in preparation for having src:sdl12-compat take over the
libsdl1.2-dev package name.
It fails to compile with:
> In file included from stack.h:31,
> from level_game.h:32,
> from berusky.h:131:
> level_game.cpp: In constructor 'level_generic::level_generic(ITEM_REPOSITORY*)':
> level_game.cpp:107:29: error: expected primary-expression before ',' token
> 107 | assert(offsetof(LEVEL_DISK, signum) == 0);
> | ^
> level_game.cpp:107:31: error: 'signum' was not declared in this scope; did you mean 'signed'?
> 107 | assert(offsetof(LEVEL_DISK, signum) == 0);
> | ^~~~~~
> level_game.cpp:107:10: error: 'offsetof' was not declared in this scope
> 107 | assert(offsetof(LEVEL_DISK, signum) == 0);
> | ^~~~~~~~
> level_game.cpp:35:1: note: 'offsetof' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
> 34 | #include "berusky.h"
> +++ |+#include <cstddef>
> 35 |
Adding #include <cstddef> according to the compiler's hint fixes the FTBFS.
I'll ask sdl12-compat upstream to add <stddef.h> to the sdl12-compat
headers, but please fix this in berusky anyway, because <cstddef> is
preferred for C++ code (and SDL is C code).
Thanks,
smcv
More information about the Pkg-games-devel
mailing list