mirror of
https://github.com/linux-usb-gadgets/libusbgx.git
synced 2025-07-20 02:15:06 +03:00
libusbgx: Fix meaning of HAS_LIBCONFIG and HAS_GADGET_SCHEMES
We have two configure options related to libconfig: 1) --disable-gadget-schemes 2) --without-libconfig Option #1 means that libusbgx itself should be compiled without gadget schemes support. Option #2 means that everything what requires libconfig should be turned off. So option #2 is wider than #1 as libconfig us used also in our testing program. To fix this meaning let's use HAS_GADGET_SCHEMES inside library source code to determine if we should use libconfig or not and HAS_LIBCONFIG inside our tests source code. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
This commit is contained in:
parent
651177558b
commit
5d0962ed41
10 changed files with 32 additions and 24 deletions
|
@ -15,7 +15,7 @@
|
|||
#include "usbg/function/net.h"
|
||||
|
||||
#include <malloc.h>
|
||||
#ifdef HAS_LIBCONFIG
|
||||
#ifdef HAS_GADGET_SCHEMES
|
||||
#include <libconfig.h>
|
||||
#endif
|
||||
|
||||
|
@ -99,7 +99,7 @@ static void ether_cleanup_attrs(struct usbg_function *f, void *f_attrs)
|
|||
usbg_f_net_cleanup_attrs(f_attrs);
|
||||
}
|
||||
|
||||
#ifdef HAS_LIBCONFIG
|
||||
#ifdef HAS_GADGET_SCHEMES
|
||||
|
||||
static int ether_libconfig_import(struct usbg_function *f,
|
||||
config_setting_t *root)
|
||||
|
@ -161,7 +161,7 @@ static int ether_libconfig_export(struct usbg_function *f,
|
|||
|
||||
#define ETHER_LIBCONFIG_DEP_OPS
|
||||
|
||||
#endif /* HAS_LIBCONFIG */
|
||||
#endif /* HAS_GADGET_SCHEMES */
|
||||
|
||||
#define ETHER_FUNCTION_OPTS \
|
||||
.alloc_inst = ether_alloc_inst, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue