Skip to content

Commit

Permalink
fix compilation on OpenBSD with several #includes
Browse files Browse the repository at this point in the history
See #1215.
  • Loading branch information
mbunkus committed May 27, 2015
1 parent 076c197 commit bcacdad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

#ifdef SYS_WINDOWS
# include <windows.h>
#endif
#elsif defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif // HAVE_UNISTD_H
#if defined(HAVE_SYS_SYSCALL_H)
# include <sys/syscall.h>
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/common/dts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include "common/common_pch.h"

#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif // HAVE_UNISTD_H

#include "common/bit_cursor.h"
#include "common/dts.h"
#include "common/endian.h"
Expand Down
4 changes: 4 additions & 0 deletions src/input/r_dts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include "common/common_pch.h"

#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif // HAVE_UNISTD_H

#include "common/codec.h"
#include "common/debugging.h"
#include "common/dts.h"
Expand Down
3 changes: 3 additions & 0 deletions src/input/r_wav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "common/common_pch.h"

#include <algorithm>
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif // HAVE_UNISTD_H

#include "avilib.h"
#include "common/ac3.h"
Expand Down

0 comments on commit bcacdad

Please sign in to comment.