File: fix_examples.patch

package info (click to toggle)
oflib 0git20070620-8
  • links: PTS
  • area: main
  • in suites: buster
  • size: 144 kB
  • sloc: ansic: 751; makefile: 46
file content (39 lines) | stat: -rw-r--r-- 1,287 bytes parent folder | download | duplicates (3)
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
39
Description: Fix oflib examples
 Fix the soundbus example, enable it and rewrite the Makefile in
 more generic way.
Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Origin: vendor, http://bugs.debian.org/609796
Bug-Debian: http://bugs.debian.org/609796

Index: oflib-0git20070620/example/Makefile
===================================================================
--- oflib-0git20070620.orig/example/Makefile	2007-06-20 20:03:56.000000000 +0200
+++ oflib-0git20070620/example/Makefile	2011-01-12 18:33:37.905016010 +0100
@@ -1,6 +1,9 @@
-default:
-	gcc -std=c99 -lofapi example.c -o example
-	gcc -std=c99 -lofapi ramtest.c -o ramtest
+BINARIES=example ramtest soundbus
+all: $(BINARIES)
+
+%: %.c
+	gcc -std=c99 -lofapi $< -o $@
 clean:
-	rm -f ramtest
-	rm -f example
+	rm -f $(BINARIES)
+
+.PHONY: clean all
Index: oflib-0git20070620/example/soundbus.c
===================================================================
--- oflib-0git20070620.orig/example/soundbus.c	2007-03-01 20:36:26.000000000 +0100
+++ oflib-0git20070620/example/soundbus.c	2011-01-12 18:33:37.905016010 +0100
@@ -73,7 +73,7 @@
 	if(!property)
 		return;
 		
-	of_property_to_int(&layout_id, property, plen);
+	of_property_to_uint32(&layout_id, property, plen);
 	
 	printf("Layout ID: %d\n", layout_id);