Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PR 50556: comms/lirc doesn't build
Add patches to work around gcc inline mess.

Note: this package should be updated and the PR contains an update, but
I don't want to do that when I can't compile it (whereas simple mechanical
patches are much less likely to go astray...)
  • Loading branch information
dholland committed May 2, 2016
1 parent 6d9fedc commit 53c320d
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 1 deletion.
8 changes: 7 additions & 1 deletion comms/lirc/distinfo
@@ -1,6 +1,12 @@
$NetBSD: distinfo,v 1.2 2015/11/03 01:34:55 agc Exp $
$NetBSD: distinfo,v 1.3 2016/05/02 02:32:14 dholland Exp $

SHA1 (lirc-0.9.0.tar.bz2) = 8456bf7101d4f2d31d61c5073357a4981b458581
RMD160 (lirc-0.9.0.tar.bz2) = d8f1cf3a03573be36787e87adc71beba3e678a37
SHA512 (lirc-0.9.0.tar.bz2) = e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431
Size (lirc-0.9.0.tar.bz2) = 857286 bytes
SHA1 (patch-daemons_config__file.c) = 1a0c581aab83217e02abca7e3080ab8abba74d8c
SHA1 (patch-daemons_config__file.h) = 5f0e21dc8ceffff9d5d82f05bd92f6dc8041813d
SHA1 (patch-daemons_receive.c) = 4b2df8f3a954b51dd1df433aabdc515b49ab3e23
SHA1 (patch-daemons_receive.h) = 82bb820eb9766cec02f20b3b2fbd1f5d7d9b5d68
SHA1 (patch-daemons_transmit.c) = 53ee2de7599c94945151acae9ec004bbfc1e71fc
SHA1 (patch-daemons_transmit.h) = e5ffa99809003e1035978d148162cd624c4264c7
15 changes: 15 additions & 0 deletions comms/lirc/patches/patch-daemons_config__file.c
@@ -0,0 +1,15 @@
$NetBSD: patch-daemons_config__file.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/config_file.c~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/config_file.c
@@ -77,7 +77,7 @@ int add_void_array(struct void_array *ar
return (1);
}

-inline void *get_void_array(struct void_array *ar)
+static inline void *get_void_array(struct void_array *ar)
{
return (ar->ptr);
}
14 changes: 14 additions & 0 deletions comms/lirc/patches/patch-daemons_config__file.h
@@ -0,0 +1,14 @@
$NetBSD: patch-daemons_config__file.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/config_file.h~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/config_file.h
@@ -67,7 +67,6 @@ struct void_array {

void **init_void_array(struct void_array *ar, size_t chunk_size, size_t item_size);
int add_void_array(struct void_array *ar, void *data);
-inline void *get_void_array(struct void_array *ar);

/* some safer functions */
void *s_malloc(size_t size);
48 changes: 48 additions & 0 deletions comms/lirc/patches/patch-daemons_receive.c
@@ -0,0 +1,48 @@
$NetBSD: patch-daemons_receive.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/receive.c~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/receive.c
@@ -25,12 +25,12 @@ extern struct ir_remote *last_remote;

struct rbuf rec_buffer;

-inline lirc_t lirc_t_max(lirc_t a, lirc_t b)
+static inline lirc_t lirc_t_max(lirc_t a, lirc_t b)
{
return (a > b ? a : b);
}

-inline void set_pending_pulse(lirc_t deltap)
+static inline void set_pending_pulse(lirc_t deltap)
{
LOGPRINTF(5, "pending pulse: %lu", deltap);
rec_buffer.pendingp = deltap;
@@ -378,7 +378,7 @@ inline int expectzero(struct ir_remote *
return (1);
}

-inline lirc_t sync_rec_buffer(struct ir_remote * remote)
+static inline lirc_t sync_rec_buffer(struct ir_remote * remote)
{
int count;
lirc_t deltas, deltap;
@@ -414,7 +414,7 @@ inline lirc_t sync_rec_buffer(struct ir_
return (deltas);
}

-inline int get_header(struct ir_remote *remote)
+static inline int get_header(struct ir_remote *remote)
{
if (is_rcmm(remote)) {
lirc_t deltap, deltas, sum;
@@ -524,7 +524,7 @@ inline int get_gap(struct ir_remote *rem
return (1);
}

-inline int get_repeat(struct ir_remote *remote)
+static inline int get_repeat(struct ir_remote *remote)
{
if (!get_lead(remote))
return (0);
14 changes: 14 additions & 0 deletions comms/lirc/patches/patch-daemons_receive.h
@@ -0,0 +1,14 @@
$NetBSD: patch-daemons_receive.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/receive.h~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/receive.h
@@ -39,7 +39,6 @@ static inline lirc_t receive_timeout(lir
return 2 * usec < MIN_RECEIVE_TIMEOUT ? MIN_RECEIVE_TIMEOUT : 2 * usec;
}

-inline lirc_t lirc_t_max(lirc_t a, lirc_t b);
void init_rec_buffer();
int clear_rec_buffer(void);
int receive_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp, int *repeat_flag,
15 changes: 15 additions & 0 deletions comms/lirc/patches/patch-daemons_transmit.c
@@ -0,0 +1,15 @@
$NetBSD: patch-daemons_transmit.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/transmit.c~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/transmit.c
@@ -27,7 +27,7 @@ struct sbuf send_buffer;
static void send_signals(lirc_t * signals, int n);
static int init_send_or_sim(struct ir_remote *remote, struct ir_ncode *code, int sim, int repeat_preset);

-inline void set_bit(ir_code * code, int bit, int data)
+void set_bit(ir_code * code, int bit, int data)
{
(*code) &= ~((((ir_code) 1) << bit));
(*code) |= ((ir_code) (data ? 1 : 0) << bit);
15 changes: 15 additions & 0 deletions comms/lirc/patches/patch-daemons_transmit.h
@@ -0,0 +1,15 @@
$NetBSD: patch-daemons_transmit.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/transmit.h~ 2011-03-25 22:28:18.000000000 +0000
+++ daemons/transmit.h
@@ -29,7 +29,7 @@ struct sbuf {
};

void init_send_buffer(void);
-inline void set_bit(ir_code * code, int bit, int data);
+void set_bit(ir_code * code, int bit, int data);
int init_send(struct ir_remote *remote, struct ir_ncode *code);
int init_sim(struct ir_remote *remote, struct ir_ncode *code, int repeat_preset);

0 comments on commit 53c320d

Please sign in to comment.