Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Feb 10, 2025
1 parent 7723c48 commit dcb80d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ext/common/psx_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,10 @@
#define INLINE
#endif

#if __cplusplus >= 201103L
#define REGISTER
#else
#define REGISTER register
#endif

#endif /*_PSX_COMMON_H_*/
4 changes: 2 additions & 2 deletions ext/common/psx_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static INLINE bool list_empty(const struct list_hdr* head)

static INLINE void list_add_entry(struct list_hdr* head, struct list_hdr* value)
{
register struct list_hdr* next = head->next;
REGISTER struct list_hdr* next = head->next;

next->prev = value;
value->next = next;
Expand All @@ -71,7 +71,7 @@ static INLINE void list_add_entry(struct list_hdr* head, struct list_hdr* value)

static INLINE void list_add_tail_entry(struct list_hdr* head, struct list_hdr* value)
{
register struct list_hdr* prev = head->prev;
REGISTER struct list_hdr* prev = head->prev;

head->prev = value;
value->next = head;
Expand Down

0 comments on commit dcb80d7

Please sign in to comment.