Skip to content

Commit

Permalink
exitwhen: Fix compilation on FreeBSD
Browse files Browse the repository at this point in the history
POSIX says WIFEXITED() and friends require <sys/wait.h>.  Linux
happens to leak those out other headers as well, but FreeBSD was
stricter.  Meanwhile, mingw lacks that header, so copy the paradigm
used elsewhere for conditional inclusion.
  • Loading branch information
ebblake committed Feb 27, 2023
1 parent 5eaec1b commit e442bd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion filters/exitwhen/exitwhen.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* nbdkit
* Copyright (C) 2019-2020 Red Hat Inc.
* Copyright (C) 2019-2023 Red Hat Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -44,6 +44,10 @@
#include <errno.h>
#include <sys/types.h>

#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif

#include <pthread.h>

#include <nbdkit-filter.h>
Expand Down

0 comments on commit e442bd1

Please sign in to comment.