Skip to content

Commit 067a1f5

Browse files
committed
Merge branch 'js/compat-itimer'
Pieces to support compilation on __TANDEM. * js/compat-itimer: Add a no-op setitimer() wrapper
2 parents e15f390 + 7f9e848 commit 067a1f5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ all::
159159
# Define NO_PREAD if you have a problem with pread() system call (e.g.
160160
# cygwin1.dll before v1.5.22).
161161
#
162+
# Define NO_SETITIMER if you don't have setitimer()
163+
#
164+
# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval
165+
# This also implies NO_SETITIMER
166+
#
162167
# Define NO_THREAD_SAFE_PREAD if your pread() implementation is not
163168
# thread-safe. (e.g. compat/pread.c or cygwin)
164169
#
@@ -1677,6 +1682,13 @@ endif
16771682
ifdef OBJECT_CREATION_USES_RENAMES
16781683
COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1
16791684
endif
1685+
ifdef NO_STRUCT_ITIMERVAL
1686+
COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL
1687+
NO_SETITIMER=YesPlease
1688+
endif
1689+
ifdef NO_SETITIMER
1690+
COMPAT_CFLAGS += -DNO_SETITIMER
1691+
endif
16801692
ifdef NO_PREAD
16811693
COMPAT_CFLAGS += -DNO_PREAD
16821694
COMPAT_OBJS += compat/pread.o

git-compat-util.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@
167167
extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
168168
#endif
169169

170+
#ifdef NO_STRUCT_ITIMERVAL
171+
struct itimerval {
172+
struct timeval it_interval;
173+
struct timeval it_value;
174+
}
175+
#endif
176+
177+
#ifdef NO_SETITIMER
178+
#define setitimer(which,value,ovalue)
179+
#endif
180+
170181
#ifndef NO_LIBGEN_H
171182
#include <libgen.h>
172183
#else

0 commit comments

Comments
 (0)