diff options
author | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-20 20:41:12 +0000 |
---|---|---|
committer | laforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2006-10-20 20:41:12 +0000 |
commit | 8045fdfb09c2e3b466f371b2ab64ff01f9f7aec1 (patch) | |
tree | 270a3b123e7d4de7cb55da08e6cf6eb39461777e /src/libgsmd | |
parent | 561a8d7fa4a003862b2640bd3458c0188ae2eab8 (diff) |
- 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
Diffstat (limited to 'src/libgsmd')
-rw-r--r-- | src/libgsmd/Makefile.am | 9 | ||||
-rw-r--r-- | src/libgsmd/libgsmd.c | 5 | ||||
-rw-r--r-- | src/libgsmd/libgsmd_voicecall.c | 2 |
3 files changed, 14 insertions, 2 deletions
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 <sys/socket.h> #include <sys/un.h> +#include <gsmd/usock.h> #include <libgsmd/libgsmd.h> #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 <libgsmd/voicecall.h> -#include "libgsmd/internals.h" +#include "lgsm_internals.h" int lgsm_voice_out_init(struct lgsm_handle *lh, |