diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f942415ed96..27c1f54e54f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -464,10 +464,13 @@ our $typeKernelTypedefs = qr{(?x: (?:__)?(?:u|s|be|le)(?:8|16|32|64)| atomic_t )}; +# DIR is misinterpreted as a macro or value in some POSIX headers +our $typePosixTypedefs = qr{DIR}; our $typeTypedefs = qr{(?x: $typeC99Typedefs\b| $typeOtherOSTypedefs\b| - $typeKernelTypedefs\b + $typeKernelTypedefs\b| + $typePosixTypedefs\b )}; our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};