Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2022 17:10:31 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1c1bf5bd7c1e - main - x86: Remove silly checks for <sys/cdefs.h>.
Message-ID:  <202204121710.23CHAVRB051581@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c1bf5bd7c1e479a7889839b941f53e689aa2569

commit 1c1bf5bd7c1e479a7889839b941f53e689aa2569
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-12 17:05:39 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-12 17:05:39 +0000

    x86: Remove silly checks for <sys/cdefs.h>.
    
    These headers #include <sys/cdefs.h> right after checking if it has
    already been #included.  The nested #include already existed when the
    check for _SYS_CDEFS_H_ was added, so the check shouldn't have been
    added in the first place.
    
    PR:             263102 (exp-run)
    Reported by:    brooks
    Reviewed by:    brooks, imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D34796
---
 sys/amd64/include/in_cksum.h | 4 ----
 sys/i386/include/in_cksum.h  | 4 ----
 2 files changed, 8 deletions(-)

diff --git a/sys/amd64/include/in_cksum.h b/sys/amd64/include/in_cksum.h
index 89ff1097f369..7407b4ad7104 100644
--- a/sys/amd64/include/in_cksum.h
+++ b/sys/amd64/include/in_cksum.h
@@ -37,10 +37,6 @@
 #ifndef _MACHINE_IN_CKSUM_H_
 #define	_MACHINE_IN_CKSUM_H_	1
 
-#ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
-#endif
-
 #include <sys/cdefs.h>
 
 #define in_cksum(m, len)	in_cksum_skip(m, len, 0)
diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h
index 4f116b8b655c..84e369cf3c81 100644
--- a/sys/i386/include/in_cksum.h
+++ b/sys/i386/include/in_cksum.h
@@ -37,10 +37,6 @@
 #ifndef _MACHINE_IN_CKSUM_H_
 #define	_MACHINE_IN_CKSUM_H_	1
 
-#ifndef _SYS_CDEFS_H_
-#error this file needs sys/cdefs.h as a prerequisite
-#endif
-
 #include <sys/cdefs.h>
 
 #define in_cksum(m, len)	in_cksum_skip(m, len, 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204121710.23CHAVRB051581>