summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/connman.h16
-rw-r--r--src/udev-compat.c40
3 files changed, 42 insertions, 16 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8b733464..b146a4b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,6 +15,8 @@ connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \
if UDEV
connmand_SOURCES += udev.c
+else
+connmand_SOURCES += udev-compat.c
endif
connmand_LDADD = $(top_builddir)/plugins/libbuiltin.la \
diff --git a/src/connman.h b/src/connman.h
index 22737693..24b64adb 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -186,25 +186,9 @@ void __connman_connection_cleanup(void);
void __connman_connection_update_gateway(void);
-#ifdef HAVE_UDEV
int __connman_udev_init(void);
void __connman_udev_cleanup(void);
char *__connman_udev_get_devtype(const char *ifname);
-#else
-static inline int __connman_udev_init(void)
-{
- return 0;
-}
-
-static inline void __connman_udev_cleanup(void)
-{
-}
-
-static inline char *__connman_udev_get_devtype(const char *ifname)
-{
- return NULL;
-}
-#endif
#include <connman/device.h>
diff --git a/src/udev-compat.c b/src/udev-compat.c
new file mode 100644
index 00000000..516a48db
--- /dev/null
+++ b/src/udev-compat.c
@@ -0,0 +1,40 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "connman.h"
+
+char *__connman_udev_get_devtype(const char *ifname)
+{
+ return NULL;
+}
+
+int __connman_udev_init(void)
+{
+ return 0;
+}
+
+void __connman_udev_cleanup(void)
+{
+}