Skip to content

Commit

Permalink
Guard string includes for windows
Browse files Browse the repository at this point in the history
Issue #15

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Mar 1, 2017
1 parent a868f04 commit 673ec77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gammu/src/convertors/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
#include "misc.h"

/* Strings */
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#include <bytesobject.h>

gboolean BoolFromPython(PyObject * o, const char *key)
Expand Down
5 changes: 5 additions & 0 deletions gammu/src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
*/

#include "misc.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

char *mystrncpy(char *dest, const char *src, size_t n) {
strncpy(dest, src, n);
Expand Down

0 comments on commit 673ec77

Please sign in to comment.