Skip to content

Commit

Permalink
eventdev: drop custom OS defines
Browse files Browse the repository at this point in the history
The eventdev library doesn't need to put in place its own defines for
Linux and BSD. There are already defines for the OS environment in
rte_config.h that can be re-used, but since these are just for
identifying Linux/non-Linux, we can just check for the standard define
'__linux__' instead.

Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
  • Loading branch information
bruce-richardson authored and jerinjacobk committed Oct 4, 2023
1 parent da693ff commit 53b2eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions lib/eventdev/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ if is_windows
subdir_done()
endif

if is_linux
cflags += '-DLINUX'
else
cflags += '-DBSD'
endif

sources = files(
'eventdev_private.c',
'eventdev_trace_points.c',
Expand Down
6 changes: 3 additions & 3 deletions lib/eventdev/rte_event_eth_rx_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <ctype.h>
#include <stdlib.h>
#include <pthread.h>
#if defined(LINUX)
#if defined(__linux__)
#include <sys/epoll.h>
#endif
#include <unistd.h>
Expand Down Expand Up @@ -1567,11 +1567,11 @@ rxa_default_conf_cb(uint8_t id, uint8_t dev_id,
static int
rxa_epoll_create1(void)
{
#if defined(LINUX)
#if defined(__linux__)
int fd;
fd = epoll_create1(EPOLL_CLOEXEC);
return fd < 0 ? -errno : fd;
#elif defined(BSD)
#else
return -ENOTSUP;
#endif
}
Expand Down

0 comments on commit 53b2eaa

Please sign in to comment.