diff options
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/tests/Makefile.am | 2 | ||||
-rw-r--r-- | libnm/tests/common.c | 4 | ||||
-rw-r--r-- | libnm/tests/common.h | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/libnm/tests/Makefile.am b/libnm/tests/Makefile.am index 0acbae8fe3..0c3bfda0cf 100644 --- a/libnm/tests/Makefile.am +++ b/libnm/tests/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/libnm \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ - -DNETWORKMANAGER_COMPILATION \ + -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ -DTEST_NM_SERVICE=\"$(abs_top_srcdir)/tools/test-networkmanager-service.py\" \ $(GLIB_CFLAGS) diff --git a/libnm/tests/common.c b/libnm/tests/common.c index 5b3f74eb27..9b71afb391 100644 --- a/libnm/tests/common.c +++ b/libnm/tests/common.c @@ -120,6 +120,8 @@ nm_test_service_cleanup (NMTestServiceInfo *info) g_free (info); } +#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) + typedef struct { GMainLoop *loop; const char *ifname; @@ -232,3 +234,5 @@ nm_test_service_add_wired_device (NMTestServiceInfo *sinfo, NMClient *client, { return add_device_common (sinfo, client, "AddWiredDevice", ifname, hwaddr, subchannels); } + +#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */ diff --git a/libnm/tests/common.h b/libnm/tests/common.h index 501ea16c4e..7ac61bb392 100644 --- a/libnm/tests/common.h +++ b/libnm/tests/common.h @@ -32,6 +32,8 @@ typedef struct { NMTestServiceInfo *nm_test_service_init (void); void nm_test_service_cleanup (NMTestServiceInfo *info); +#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) + NMDevice *nm_test_service_add_device (NMTestServiceInfo *info, NMClient *client, const char *method, @@ -43,3 +45,5 @@ NMDevice * nm_test_service_add_wired_device (NMTestServiceInfo *sinfo, const char *hwaddr, const char **subchannels); +#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */ + |