Skip to content

Commit b741481

Browse files
committed
addressing commenrts from pull request
1 parent 6de4767 commit b741481

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

src/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ libdispatch_la_SOURCES= \
1717
queue.c \
1818
semaphore.c \
1919
source.c \
20-
stubs.c \
2120
time.c \
2221
transform.c \
2322
voucher.c \
@@ -40,6 +39,8 @@ libdispatch_la_SOURCES= \
4039
shims/atomic_sfb.h \
4140
shims/getprogname.h \
4241
shims/hw_config.h \
42+
shims/linux_stubs.c \
43+
shims/linux_stubs.h \
4344
shims/perfmon.h \
4445
shims/time.h \
4546
shims/tsd.h \

src/internal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282

8383

8484
#include <os/object.h>
85-
#include "stubs_internal.h"
8685
#include <dispatch/time.h>
8786
#include <dispatch/object.h>
8887
#include <dispatch/queue.h>

src/io.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,10 @@ dispatch_io_create_with_path(dispatch_io_type_t type, const char *path,
388388
struct stat st;
389389
_dispatch_io_syscall_switch_noerr(err,
390390
(path_data->oflag & O_NOFOLLOW) == O_NOFOLLOW
391-
#ifdef __LINUX_PORT_HDD__
392-
?
393-
lstat(path_data->path, &st) : stat(path_data->path, &st),
394-
#else
395-
|| (path_data->oflag & O_SYMLINK) == O_SYMLINK ?
396-
lstat(path_data->path, &st) : stat(path_data->path, &st),
391+
#ifndef __linux__
392+
|| (path_data->oflag & O_SYMLINK) == O_SYMLINK
397393
#endif
394+
? lstat(path_data->path, &st) : stat(path_data->path, &st),
398395
case 0:
399396
err = _dispatch_io_validate_type(channel, st.st_mode);
400397
break;
@@ -2069,7 +2066,7 @@ _dispatch_disk_perform(void *ctxt)
20692066
static void
20702067
_dispatch_operation_advise(dispatch_operation_t op, size_t chunk_size)
20712068
{
2072-
#ifdef __LINUX_PORT_HDD__
2069+
#ifndef F_RDADVISE
20732070
LINUX_PORT_ERROR();
20742071
#else
20752072
int err;

src/shims.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ void __builtin_trap(void);
159159
#define DISPATCH_ATOMIC_UP 1
160160
#endif
161161

162+
#ifdef __linux__
163+
#include "shims/linux_stubs.h"
164+
#endif
165+
162166
#include "shims/atomic.h"
163167
#include "shims/atomic_sfb.h"
164168
#include "shims/tsd.h"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)