Skip to content

Commit

Permalink
Setting default path for rshim config file
Browse files Browse the repository at this point in the history
Reviewed-by: Liming Sun <[email protected]>
Signed-off-by: Liming Sun <[email protected]>
  • Loading branch information
Hans Petter Selasky authored and lsun100 committed Mar 25, 2021
1 parent 0ae03b4 commit 4a1e4f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,18 @@ fi
])

if test $backend = freebsd; then
AC_SUBST(CPPFLAGS, "$CPPFLAGS -I/usr/local/include/libepoll-shim")
AC_SUBST(LDFLAGS, "$LDFLAGS -L/usr/local/lib")
AC_SUBST(CPPFLAGS, "$CPPFLAGS -I${prefix}/include/libepoll-shim")
AC_SUBST(LDFLAGS, "$LDFLAGS -L${prefix}/lib")
AC_CHECK_HEADERS([sys/epoll.h],[],[AC_MSG_ERROR([Missing libepoll-shim])])
AC_CHECK_LIB(epoll-shim, epoll_create1)
fi
AM_CONDITIONAL([OS_FREEBSD], [test "x$backend" = "xfreebsd"])

if test "x$prefix" = "xNONE" ; then
prefix=""
fi
AC_SUBST(CPPFLAGS, "$CPPFLAGS -DDEFAULT_RSHIM_CONFIG_FILE='\"${prefix}/etc/rshim.conf\"'")

AC_CHECK_LIB(pthread, pthread_create)

AC_OUTPUT
2 changes: 1 addition & 1 deletion src/rshim.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ int rshim_static_index = -1;
char *rshim_static_dev_name;

/* Default configuration file. */
char *rshim_cfg_file = "/etc/rshim.conf";
const char *rshim_cfg_file = DEFAULT_RSHIM_CONFIG_FILE;
static int rshim_display_level = 0;
static int rshim_boot_timeout = 100;
int rshim_drop_mode = -1;
Expand Down

0 comments on commit 4a1e4f6

Please sign in to comment.