Skip to content

Commit

Permalink
Patch __has_buitin
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
larryliu0820 committed Dec 4, 2024
1 parent acad533 commit a560ee7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
#define TK_WEAK __attribute__((weak))
#endif

#ifndef __has_builtin
#define __has_builtin(x) (0)
#endif

#if __has_builtin(__builtin_strrchr)
/// Name of the source file without a directory string.
#define TK_SHORT_FILENAME (__builtin_strrchr("/" __FILE__, '/') + 1)
Expand Down

0 comments on commit a560ee7

Please sign in to comment.