Skip to content

Commit

Permalink
test_dirfuncs_compat: Fix warning
Browse files Browse the repository at this point in the history
Since dirfd() may be defined as a macro, it needs to be undefined
before defining it, to avoid a warning.

TESTED:
Tested on 10.4-10.5 ppc, 10.4-10.6 i386, 10.5-10.6 ppc (i386 Rosetta),
10.5-12.x x86_64, 11.x-14.x arm64.
Redfinition warning is now gone.
  • Loading branch information
fhgwright authored and mascguy committed Apr 21, 2024
1 parent 1d0f8c4 commit ed9b89e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_dirfuncs_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#define seekdir __mpls_seekdir
#define rewinddir __mpls_rewinddir
#define closedir __mpls_closedir
#undef dirfd
#define dirfd __mpls_dirfd

#include "test_fdopendir.c"
Expand Down

0 comments on commit ed9b89e

Please sign in to comment.