From 8045fdfb09c2e3b466f371b2ab64ff01f9f7aec1 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 20 Oct 2006 20:41:12 +0000 Subject: - some more gsmd / libgsmd code - use autotools for build process git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@94 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/libgsmd/Makefile.am | 9 +++++++++ src/libgsmd/libgsmd.c | 5 ++++- src/libgsmd/libgsmd_voicecall.c | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 src/libgsmd/Makefile.am (limited to 'src/libgsmd') diff --git a/src/libgsmd/Makefile.am b/src/libgsmd/Makefile.am new file mode 100644 index 0000000..2e8988f --- /dev/null +++ b/src/libgsmd/Makefile.am @@ -0,0 +1,9 @@ +LIBVERSION= 0:0:0 +INCLUDES = $(all_includes) -I$(top_srcdir)/include +AM_CFLAGS = -std=gnu99 + +lib_LTLIBRARIES = libgsmd.la + +libgsmd_la_LDFLAGS = -Wc,-nostartfiles -version-info $(LIBVERSION) +libgsmd_la_SOURCES = libgsmd.c libgsmd_input.c libgsmd_voicecall.c + diff --git a/src/libgsmd/libgsmd.c b/src/libgsmd/libgsmd.c index 7eb2701..77b8499 100644 --- a/src/libgsmd/libgsmd.c +++ b/src/libgsmd/libgsmd.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "lgsm_internals.h" @@ -40,7 +41,7 @@ static int lgsm_open_backend(struct lgsm_handle *lh, const char *device) { int rc; - if (!strcmp(device, "gsmd")) { + if (!strcmp(device, LGSMD_DEVICE_GSMD)) { struct sockaddr_un sun; /* use unix domain socket to gsm daemon */ @@ -48,8 +49,10 @@ static int lgsm_open_backend(struct lgsm_handle *lh, const char *device) if (lh->fd < 0) return lh->fd; + memset(&sun, 0, sizeof(sun)); sun.sun_family = AF_UNIX; memcpy(sun.sun_path, GSMD_UNIX_SOCKET, sizeof(GSMD_UNIX_SOCKET)); + printf("sizeof(GSMD_UNIX_SOCKET) = %u\n", sizeof(GSMD_UNIX_SOCKET)); rc = connect(lh->fd, (struct sockaddr *)&sun, sizeof(sun)); if (rc < 0) { diff --git a/src/libgsmd/libgsmd_voicecall.c b/src/libgsmd/libgsmd_voicecall.c index f59bdff..25c565d 100644 --- a/src/libgsmd/libgsmd_voicecall.c +++ b/src/libgsmd/libgsmd_voicecall.c @@ -2,7 +2,7 @@ #include -#include "libgsmd/internals.h" +#include "lgsm_internals.h" int lgsm_voice_out_init(struct lgsm_handle *lh, -- cgit v1.2.3