From: bluhm Date: Thu, 22 Feb 2018 20:27:14 +0000 (+0000) Subject: The compile time assertion for cpu info did not work with gcc. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e6ef12fb2ef59265742c0b0d1cc73fb483b88444;p=openbsd 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@ --- 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 * @@ -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_ */