The simple answer is: it isn't 24 bytes. Or you're running on on the 64 bit s390 port of Linux that I haven't been able to find the ABI documentation for. Every other 64 bit hardware that Debian can run on will have the size of this struct as 16 bytes.
I have dug up the ABI documentation for a bunch of different CPU ABIs and they all have more or less this wording (it seems they have all been copying from each other):
Structures and unions assume the alignment of their most strictly aligned component. Each member is assigned to the lowest available offset with the appropriate alignment. The size of any object is always a multiple of the object's alignment.
And all architecture ABI documents I found (mips64, ppc64, amd64, ia64, sparc64, arm64) have the alignment for char 1, short 2, int 4 and long long 8.
Even though operating systems are allowed to make their own ABI, almost every unix-like system and especially Linux follow the System V ABI and their supplemental CPU documentation that specifies this behavior very well. And Debian will definitely not change this behavior to be different from all other Linuxes.
Here's a quick verification (all on amd64/x86_64 which is what you're most likely running):
$ cat > foo.c
#include <stdio.h>
int
main(int argc, char **argv)
{
struct {
long long ll;
char ch2;
char ch1;
short s;
int i;
} foo;
printf("%d\n", (int)sizeof(foo));
return 0;
}
MacOS:
$ cc -o foo foo.c && ./foo && uname -ms
16
Darwin x86_64
Ubuntu:
$ cc -o foo foo.c && ./foo && uname -ms
16
Linux x86_64
CentOS:
$ cc -o foo foo.c && ./foo && uname -ms
16
Linux x86_64
OpenBSD:
$ cc -o foo foo.c && ./foo && uname -ms
16
OpenBSD amd64
There's something else wrong with your compilation. Or that's not the struct you're testing or you're running on a very strange hardware architecture and specifying it as "64 bit" is equivalent to saying "I'm driving this government issued vehicle and it has very strange acceleration and the engine cuts out after 5 minutes" and not mentioning that you're talking about the space shuttle.