Skip to content

Commit c211683

Browse files
committed
compat/platform_{pipe,semaphore}: IWYU
1 parent 26ffbfd commit c211683

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

src/audio/capture/jack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "audio/types.h"
4545
#include "audio/utils.h"
4646
#include "compat/platform_semaphore.h"
47+
#include "config.h" // for PACKAGE_STRING
4748
#include "debug.h"
4849
#include "host.h"
4950
#include "jack_common.h"

src/compat/platform_pipe.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,20 @@
3535
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3636
*/
3737

38-
#ifdef HAVE_CONFIG_H
39-
#include "config.h"
40-
#endif // HAVE_CONFIG_H
41-
#include "config_unix.h"
42-
#include "config_win32.h"
43-
4438
#include "compat/platform_pipe.h"
45-
#include "rtp/net_udp.h" // socket_error
4639

40+
#include <cstdio> // for perror, NULL, fprintf, stderr
41+
#include <cstring> // for memset
42+
#include <sys/time.h> // for timeval
4743
#include <thread>
4844

45+
#ifndef _WIN32
46+
#include <unistd.h> // for pipe
47+
#endif
48+
49+
#include "rtp/net_udp.h" // socket_error
50+
#include "compat/net.h" // htons etc.
51+
4952
using std::thread;
5053

5154
#ifdef _WIN32

src/compat/platform_semaphore.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@
4646
*
4747
*/
4848

49-
#ifdef HAVE_CONFIG_H
50-
#include "config.h"
51-
#include "config_unix.h"
52-
#include "config_win32.h"
53-
#endif // HAVE_CONFIG_H
49+
#include "compat/platform_semaphore.h"
5450

55-
#include "debug.h"
51+
#include <errno.h> // for EINTR, errno
52+
#include <stdio.h> // for perror
53+
#include <stdlib.h> // for abort
5654

5755
#ifdef __APPLE__
5856
#include <mach/semaphore.h>
@@ -62,12 +60,10 @@
6260
#include <semaphore.h>
6361
#endif /* __APPLE__ */
6462

65-
#include "compat/platform_semaphore.h"
66-
6763
void platform_sem_init(void *semStructure, int pshared, int initialValue)
6864
{
6965
#ifdef __APPLE__
70-
UNUSED(pshared);
66+
(void) pshared;
7167
semaphore_create(mach_task_self(), (semaphore_t *) semStructure,
7268
SYNC_POLICY_FIFO, initialValue);
7369
#else

src/compat/platform_semaphore.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
*
4747
*/
4848

49-
#include "config.h"
50-
#include "config_unix.h"
51-
#include "config_win32.h"
52-
5349
#ifndef _PLATFORM_SEMAPHORE_H
5450
#define _PLATFORM_SEMAPHORE_H
5551

src/video_capture/testcard2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
#include "audio/types.h" // for audio_frame
6464
#include "compat/platform_semaphore.h" // for platform_sem_post, platform_s...
65+
#include "compat/usleep.h" // for usleep
6566
#include "debug.h" // for log_msg, LOG_LEVEL_ERROR, LOG...
6667
#include "host.h" // for exit_uv, audio_capture_channels
6768
#include "lib_common.h" // for REGISTER_MODULE, library_class

0 commit comments

Comments
 (0)