Skip to content

Commit e9cdc4c

Browse files
trippletffainelli
authored andcommitted
Fix crash (and compiler warnings)
[Upstream: opsengine#48] Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
1 parent f4d2682 commit e9cdc4c

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/cpulimit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include <sys/types.h>
4444
#include <sys/wait.h>
4545

46-
#ifdef __APPLE__ || __FREEBSD__
46+
#if defined(__APPLE__) || defined(__FREEBSD__)
4747
#include <libgen.h>
4848
#endif
4949

src/process_group.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include <sys/time.h>
2626
#include <signal.h>
2727

28+
#if defined(__APPLE__) || defined(__FREEBSD__)
29+
#include <libgen.h>
30+
#endif
31+
2832
#include <assert.h>
2933

3034
#include "process_iterator.h"

tests/process_iterator_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <signal.h>
2929
#include <string.h>
3030

31-
#ifdef __APPLE__ || __FREEBSD__
31+
#if defined(__APPLE__) || defined(__FREEBSD__)
3232
#include <libgen.h>
3333
#endif
3434

0 commit comments

Comments
 (0)