Skip to content

Commit

Permalink
Fix dirent.h clang build failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue authored and cjones051073 committed Sep 15, 2023
1 parent 8b5a02f commit 707aab7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions include/dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,26 @@
#undef seekdir
#undef telldir

#ifndef __MPLS_ALIAS
# define __MPLS_ALIAS(sym) __DARWIN_ALIAS(sym)
#endif

/* Fallback to __DARWIN_ALIAS if the other variants are not defined (?) */
/* Note: I don't know if this makes sense */
#ifdef __DARWIN_ALIAS_I
# define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS_I(sym)
#else
# define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS(sym)
#ifndef __MPLS_ALIAS_I
# ifdef __DARWIN_ALIAS_I
# define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS_I(sym)
# else
# define __MPLS_ALIAS_I(sym) __DARWIN_ALIAS(sym)
# endif
#endif

#ifdef __DARWIN_INODE64
# define __MPLS_INODE64(sym) __DARWIN_INODE64(sym)
#else
# define __MPLS_INODE64(sym) __DARWIN_ALIAS(sym)
#ifndef __MPLS_INODE64
# ifdef __DARWIN_INODE64
# define __MPLS_INODE64(sym) __DARWIN_INODE64(sym)
# else
# define __MPLS_INODE64(sym) __DARWIN_ALIAS(sym)
# endif
#endif

/* Declare alternative names for the underlying functions for use by the wrappers */
Expand Down

0 comments on commit 707aab7

Please sign in to comment.