aboutsummaryrefslogtreecommitdiff
path: root/utils/avrdude/patches/110-ud-to-u.patch
blob: 470f4da679691d2aa431a24003ab5f8a42a751c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/linuxgpio.c
+++ b/linuxgpio.c
@@ -66,7 +66,7 @@ static int linuxgpio_export(unsigned int
     return fd;
   }
 
-  len = snprintf(buf, sizeof(buf), "%ud", gpio);
+  len = snprintf(buf, sizeof(buf), "%u", gpio);
   r = write(fd, buf, len);
   close(fd);
 
@@ -84,7 +84,7 @@ static int linuxgpio_unexport(unsigned i
     return fd;
   }
 
-  len = snprintf(buf, sizeof(buf), "%ud", gpio);
+  len = snprintf(buf, sizeof(buf), "%u", gpio);
   r = write(fd, buf, len);
   close(fd);
 
@@ -95,7 +95,7 @@ static int linuxgpio_openfd(unsigned int
 {
   char filepath[60];
 
-  snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%ud/value", gpio);
+  snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%u/value", gpio);
   return (open(filepath, O_RDWR));
 }
 
@@ -104,7 +104,7 @@ static int linuxgpio_dir(unsigned int gp
   int fd, r;
   char buf[60];
 
-  snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%ud/direction", gpio);
+  snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%u/direction", gpio);
 
   fd = open(buf, O_WRONLY);
   if (fd < 0) {