diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-09-21 15:03:43 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-09-21 15:03:43 +0000 |
commit | 2380a3cfc59187ebd4191bdd9b21291570c66180 (patch) | |
tree | 79244d9fb03cd36296a1f10c4686303eb673dbdf /comms/lirc/files/patch-daemons_hw__srm7500libusb.c | |
parent | Add textproc/bibclean (diff) |
Fix build with -fno-common
While here add license and regenerate all patches with make makepatch.
Notes
Notes:
svn path=/head/; revision=549449
Diffstat (limited to 'comms/lirc/files/patch-daemons_hw__srm7500libusb.c')
-rw-r--r-- | comms/lirc/files/patch-daemons_hw__srm7500libusb.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/comms/lirc/files/patch-daemons_hw__srm7500libusb.c b/comms/lirc/files/patch-daemons_hw__srm7500libusb.c new file mode 100644 index 000000000000..d3a92bd26262 --- /dev/null +++ b/comms/lirc/files/patch-daemons_hw__srm7500libusb.c @@ -0,0 +1,26 @@ +--- daemons/hw_srm7500libusb.c.orig 2011-03-25 22:28:18 UTC ++++ daemons/hw_srm7500libusb.c +@@ -54,6 +54,23 @@ + #define USB_TIMEOUT (1000*10) + #define CONTROL_BUFFERSIZE 128 + ++#ifndef HAVE_STRNLEN ++size_t ++strnlen(const char *s, size_t maxlen) ++{ ++ size_t ret = strlen(s); ++ return ret > maxlen ? maxlen : ret; ++} ++#endif ++ ++#ifndef HAVE_STRCHRNUL ++char *strchrnul(const char *s, int ch) ++{ ++ char *ret = strchr(s, ch); ++ return ret == NULL ? ((char *)s) + strlen(s) : ret; ++} ++#endif ++ + static int srm7500_init(); + static int srm7500_deinit(); + static char *srm7500_rec(struct ir_remote *remotes); |