lirc: update to 0.9.4d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Khem Raj
2017-04-21 17:00:15 -07:00
committed by Martin Jansa
parent 1d7d2dbfc8
commit 6723757dc4
4 changed files with 126 additions and 72 deletions

View File

@@ -1,49 +0,0 @@
From c2be4543e4777c9e3d74b30326ba37b01917b0a9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 25 Aug 2016 03:02:37 +0000
Subject: [PATCH] lircrcd: Mark local inline funtions as static
These functions are not used anywhere outside
this file, so they should be converted into static
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
daemons/lircrcd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/daemons/lircrcd.c b/daemons/lircrcd.c
index 55777cd..5ddc94d 100644
--- a/daemons/lircrcd.c
+++ b/daemons/lircrcd.c
@@ -153,7 +153,7 @@ char *s;
/* A safer write(), since sockets might not write all but only some of the
bytes requested */
-inline int write_socket(int fd, char *buf, int len)
+static inline int write_socket(int fd, char *buf, int len)
{
int done, todo = len;
@@ -167,7 +167,7 @@ inline int write_socket(int fd, char *buf, int len)
return (len);
}
-inline int write_socket_len(int fd, char *buf)
+static inline int write_socket_len(int fd, char *buf)
{
int len;
@@ -177,7 +177,7 @@ inline int write_socket_len(int fd, char *buf)
return (1);
}
-inline int read_timeout(int fd, char *buf, int len, int timeout)
+static inline int read_timeout(int fd, char *buf, int len, int timeout)
{
fd_set fds;
struct timeval tv;
--
1.9.1

View File

@@ -0,0 +1,101 @@
Index: lirc-0.9.4d/daemons/lircrcd.cpp
===================================================================
--- lirc-0.9.4d.orig/daemons/lircrcd.cpp
+++ lirc-0.9.4d/daemons/lircrcd.cpp
@@ -29,10 +29,12 @@
#include <sys/un.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <poll.h>
#include <syslog.h>
#include "lirc_client.h"
#include "lirc/lirc_log.h"
+#include "lirc/curl_poll.h"
#define MAX_CLIENTS 100
#define WHITE_SPACE " \t"
Index: lirc-0.9.4d/lib/curl_poll.c
===================================================================
--- lirc-0.9.4d.orig/lib/curl_poll.c
+++ lirc-0.9.4d/lib/curl_poll.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/poll.h>
#include "lirc_log.h"
#include "curl_poll.h"
@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L
#ifdef HAVE_POLL_FINE
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
{
return poll(ufds, nfds, timeout_ms);
}
@@ -112,7 +113,7 @@ static int verify_sock(int s)
}
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms)
{
struct timeval pending_tv;
struct timeval* ptimeout;
Index: lirc-0.9.4d/lib/curl_poll.h
===================================================================
--- lirc-0.9.4d.orig/lib/curl_poll.h
+++ lirc-0.9.4d/lib/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef _LIB_CURL_POLL_H
+#define _LIB_CURL_POLL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -29,13 +29,9 @@
extern "C" {
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#else
#include <poll.h>
-#endif
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
#ifdef __cplusplus
}
Index: lirc-0.9.4d/lib/lirc/curl_poll.h
===================================================================
--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h
+++ lirc-0.9.4d/lib/lirc/curl_poll.h
@@ -1,5 +1,5 @@
-#ifndef _POLL_H
-#define _POLL_H
+#ifndef _LIRC_CURL_POLL_H
+#define _LIRC_CURL_POLL_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -29,13 +29,9 @@
extern "C" {
#endif
-#ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
-#else
#include <poll.h>
-#endif
-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms);
+int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms);
#ifdef __cplusplus
}