We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04098a3 commit aa18e03Copy full SHA for aa18e03
src/modules/out_5a_75e.c
@@ -32,6 +32,13 @@
32
#define WIDTH 256
33
#define HEIGHT 256
34
35
+#define xstr(x) str(x)
36
+#define str(x) #x
37
+
38
+#ifndef INTERFACE
39
+#error "define INTERFACE in sledconf"
40
+#endif
41
42
typedef struct
43
{
44
uint8_t b;
@@ -131,7 +138,7 @@ int init(void) {
131
138
132
139
/* Get the index of the interface to send on */
133
140
memset(&if_idx, 0, sizeof(struct ifreq));
134
- strncpy(if_idx.ifr_name, "eth0", IFNAMSIZ-1);
141
+ strncpy(if_idx.ifr_name, xstr(INTERFACE), IFNAMSIZ-1);
135
142
if (ioctl(sockfd, SIOCGIFINDEX, &if_idx) < 0)
136
143
137
144
perror("SIOCGIFINDEX");
0 commit comments