diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-22 20:27:15 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-22 20:27:15 +0000 |
commit | 691ccdfa2e98c3a9236f85f484a949aad14c8dd1 (patch) | |
tree | 046b69e6aaf06c3c6276ce6d5e4bc192c5e89c09 | |
parent | b1e58df4e27b2c37d18bb23a5b79aa61ce998bbb (diff) |
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_ */ |