Skip to content

Commit 7c27319

Browse files
authored
[libc] modify function names to resolve naming conflicts
1 parent 2552759 commit 7c27319

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

components/libc/compilers/common/ctime.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ RTM_EXPORT(rt_timespec_to_tick);
801801
struct timer_obj
802802
{
803803
struct rt_ktime_hrtimer hrtimer;
804-
void (*sigev_notify_function)(union sigval val);
804+
void (*sigev_notify_func)(union sigval val);
805805
union sigval val;
806806
struct timespec interval; /* Reload value */
807807
struct timespec value; /* Reload value */
@@ -903,7 +903,7 @@ static void rtthread_timer_wrapper(void *timerobj)
903903
}
904904
#ifdef RT_USING_SMART
905905
/* this field is named as tid in musl */
906-
void *ptid = &timer->sigev_notify_function;
906+
void *ptid = &timer->sigev_notify_func;
907907
int tid = *(int *)ptid;
908908
struct lwp_timer_event_param *data = rt_container_of(timer->work, struct lwp_timer_event_param, work);
909909
data->signo = timer->sigev_signo;
@@ -922,9 +922,9 @@ static void rtthread_timer_wrapper(void *timerobj)
922922
if (rt_work_submit(timer->work, 0))
923923
RT_ASSERT(0);
924924
#else
925-
if(timer->sigev_notify_function != RT_NULL)
925+
if(timer->sigev_notify_func != RT_NULL)
926926
{
927-
(timer->sigev_notify_function)(timer->val);
927+
(timer->sigev_notify_func)(timer->val);
928928
}
929929
#endif /* RT_USING_SMART */
930930
}
@@ -1012,7 +1012,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
10121012

10131013
timer->work = work;
10141014
#endif /* RT_USING_SMART */
1015-
timer->sigev_notify_function = evp->sigev_notify_function;
1015+
timer->sigev_notify_func = evp->sigev_notify_function;
10161016
timer->val = evp->sigev_value;
10171017
timer->interval.tv_sec = 0;
10181018
timer->interval.tv_nsec = 0;

components/libc/compilers/musl/fcntl.h

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,33 @@
2222
#define O_DSYNC 010000
2323
#define O_SYNC 04010000
2424
#define O_RSYNC 04010000
25-
#define O_DIRECTORY 040000
26-
#define O_NOFOLLOW 0100000
2725
#define O_CLOEXEC 02000000
2826

2927
#define O_ASYNC 020000
30-
#define O_DIRECT 0200000
31-
#define O_LARGEFILE 0400000
3228
#define O_NOATIME 01000000
3329
#define O_PATH 010000000
34-
#define O_TMPFILE 020040000
3530
#define O_NDELAY O_NONBLOCK
3631

32+
#ifndef O_LARGEFILE
33+
#define O_LARGEFILE 0400000
34+
#endif
35+
36+
#ifndef O_DIRECT
37+
#define O_DIRECT 0200000
38+
#endif
39+
40+
#ifndef O_TMPFILE
41+
#define O_TMPFILE 020040000
42+
#endif
43+
44+
#ifndef O_NOFOLLOW
45+
#define O_NOFOLLOW 0100000
46+
#endif
47+
48+
#ifndef O_DIRECTORY
49+
#define O_DIRECTORY 040000
50+
#endif
51+
3752
#ifndef O_BINARY
3853
#define O_BINARY 00
3954
#endif

components/lwp/lwp_syscall.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
extern "C" {
3333
#endif
3434

35-
typedef long suseconds_t; /* microseconds (signed) */
3635
typedef uint32_t id_t; /* may contain pid, uid or gid */
3736

3837
/*

0 commit comments

Comments
 (0)