# RE: [PATCH 2/2] Support for setitimer() on platforms lacking it

1 messages from 2012-08-24 to 2012-08-24. Participants: Joachim Schmitz.
Thread: https://gitlist.dev/t/31344

## Joachim Schmitz, 2012-08-24 10:43

Subject: RE: [PATCH 2/2] Support for setitimer() on platforms lacking it
Message-ID: <003401cd81e5$51b6a2b0$f523e810$@schmitz-digital.de>
URL: https://gitlist.dev/e/003401cd81e5%2451b6a2b0%24f523e810%24%40schmitz-digital.de

```

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
---
Seems it needs my mkdir() "ignoretraile slash" patch first to be applied cleanly...
It is independent of it otherwise.

 git-compat-util.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/git-compat-util.h b/git-compat-util.h
index 34f040f..a047221 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -162,6 +162,11 @@
 #define probe_utf8_pathname_composition(a,b)
 #endif
 
+#ifdef NO_SETITIMER
+#define setitimer(a,b,c) git_setitimer((a),(b),(c))
+extern int git_setitimer(int, const struct itimerval *, struct itimerval *);
+#endif
+
 #ifdef MKDIR_WO_TRAILING_SLASH
 #define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b))
 extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
-- 
1.7.12

```
