diff options
author | 2018-02-22 20:27:14 +0000 | |
---|---|---|
committer | 2018-02-22 20:27:14 +0000 | |
commit | e6ef12fb2ef59265742c0b0d1cc73fb483b88444 (patch) | |
tree | d39599cfc8dae8c69e5f678dbee03070f0f859dd | |
parent | The GNU assembler does not understand 1ULL, so replace the constant (diff) | |
download | wireguard-openbsd-e6ef12fb2ef59265742c0b0d1cc73fb483b88444.tar.xz wireguard-openbsd-e6ef12fb2ef59265742c0b0d1cc73fb483b88444.zip |
The compile time assertion for cpu info did not work with gcc.
Rephrase the condition in a way that both gcc and clang accept it.
OK guenther@
-rw-r--r-- | sys/arch/amd64/include/cpu_full.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpu_full.h b/sys/arch/amd64/include/cpu_full.h index 995cab087cf..93c433f44dd 100644 --- a/sys/arch/amd64/include/cpu_full.h +++ b/sys/arch/amd64/include/cpu_full.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu_full.h,v 1.1 2018/02/21 19:24:15 guenther Exp $ */ +/* $OpenBSD: cpu_full.h,v 1.2 2018/02/22 20:27:14 bluhm Exp $ */ /* * Copyright (c) Philip Guenther <guenther@openbsd.org> * @@ -61,6 +61,6 @@ CTASSERT(sizeof(struct cpu_info_full) % PAGE_SIZE == 0); extern struct cpu_info_full cpu_info_full_primary; /* Now make sure the cpu_info_primary macro is correct */ -CTASSERT(&cpu_info_primary == &cpu_info_full_primary.cif_cpu); +CTASSERT(&cpu_info_primary - &cpu_info_full_primary.cif_cpu == 0); #endif /* _MACHINE_CPU_FULL_H_ */ |