A couple of places were using get_hostname, which did not exist.
This patch changes those instances to use host_get_hostname(),
instead. This also requires linking with libmhost.
Signed-off-by: Russell Bryant <russell(a)russellbryant.net>
---
src/net/CMakeLists.txt | 2 +-
src/net/matahari-network-dbus.c | 3 ++-
src/service/CMakeLists.txt | 2 +-
src/service/matahari-services-dbus.c | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/net/CMakeLists.txt b/src/net/CMakeLists.txt
index 1ca5c65..e03d1a9 100644
--- a/src/net/CMakeLists.txt
+++ b/src/net/CMakeLists.txt
@@ -15,7 +15,7 @@ set(M_NET_DBUS "matahari-network-dbusd")
add_executable(${M_NET_DBUS} ${NET_DBUS_SOURCE})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(${M_NET_DBUS} mnet)
+target_link_libraries(${M_NET_DBUS} mnet mhost)
if(polkit_FOUND)
include_directories(${polkit_INCLUDE_DIRS})
diff --git a/src/net/matahari-network-dbus.c b/src/net/matahari-network-dbus.c
index 71b3100..9aa865c 100644
--- a/src/net/matahari-network-dbus.c
+++ b/src/net/matahari-network-dbus.c
@@ -30,6 +30,7 @@
/* Network methods */
#include "matahari/network.h"
#include "matahari/utilities.h"
+#include "matahari/host.h"
/* Generated properties list */
#include "matahari-network-dbus-properties.h"
@@ -197,7 +198,7 @@ matahari_get_property(GObject *object, guint property_id, GValue
*value,
switch (property_id)
{
case PROP_HOSTNAME:
- g_value_set_string (value, get_hostname());
+ g_value_set_string (value, host_get_hostname());
break;
default:
/* We don't have any other property... */
diff --git a/src/service/CMakeLists.txt b/src/service/CMakeLists.txt
index 7559082..cf49292 100644
--- a/src/service/CMakeLists.txt
+++ b/src/service/CMakeLists.txt
@@ -15,7 +15,7 @@ set(M_SRV_DBUS "matahari-services-dbusd")
add_executable(${M_SRV_DBUS} ${SRV_DBUS_SOURCE})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-target_link_libraries(${M_SRV_DBUS} msrv)
+target_link_libraries(${M_SRV_DBUS} msrv mhost)
if(polkit_FOUND)
include_directories(${polkit_INCLUDE_DIRS})
diff --git a/src/service/matahari-services-dbus.c b/src/service/matahari-services-dbus.c
index ef2973a..c09febb 100644
--- a/src/service/matahari-services-dbus.c
+++ b/src/service/matahari-services-dbus.c
@@ -27,6 +27,7 @@
/* Services methods */
#include "matahari/services.h"
#include "matahari/utilities.h"
+#include "matahari/host.h"
/* Generated properties list */
#include "matahari-services-dbus-properties.h"
@@ -233,7 +234,7 @@ matahari_get_property(GObject *object, guint property_id, GValue
*value,
switch (property_id)
{
case PROP_HOSTNAME:
- g_value_set_string (value, get_hostname());
+ g_value_set_string (value, host_get_hostname());
break;
default:
/* We don't have any other property... */
--
1.7.4
Show replies by date
On Sat, Mar 26, 2011 at 8:52 AM, Russell Bryant
<russell(a)russellbryant.net> wrote:
A couple of places were using get_hostname, which did not exist.
This patch changes those instances to use host_get_hostname(),
instead. This also requires linking with libmhost.
I went to open a pull request for this but see that there already was
one for this problem (and looks like a more appropriate patch, too).
The pull request was closed but the fix doesn't appear to be in the
repo.
https://github.com/matahari/matahari/pull/3
--
Russell Bryant