diff options
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, |