summaryrefslogtreecommitdiffstats
path: root/meta/packages/opkg/opkg/add_vercmp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/opkg/opkg/add_vercmp.patch')
-rw-r--r--meta/packages/opkg/opkg/add_vercmp.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta/packages/opkg/opkg/add_vercmp.patch b/meta/packages/opkg/opkg/add_vercmp.patch
new file mode 100644
index 0000000000..5c0473ff70
--- /dev/null
+++ b/meta/packages/opkg/opkg/add_vercmp.patch
@@ -0,0 +1,34 @@
1Index: trunk/libopkg/opkg.c
2===================================================================
3--- trunk.orig/libopkg/opkg.c 2009-10-05 14:33:47.000000000 +0100
4+++ trunk/libopkg/opkg.c 2009-10-05 20:59:19.000000000 +0100
5@@ -1092,3 +1092,18 @@
6 free(src);
7 return ret;
8 }
9+
10+int
11+opkg_compare_versions (const char *ver1, const char *ver2)
12+{
13+ pkg_t *pkg1, *pkg2;
14+
15+ pkg1 = pkg_new();
16+ pkg2 = pkg_new();
17+
18+ parseVersion(pkg1, ver1);
19+ parseVersion(pkg2, ver2);
20+
21+ return pkg_compare_versions(pkg1, pkg2);
22+}
23+
24Index: trunk/libopkg/opkg.h
25===================================================================
26--- trunk.orig/libopkg/opkg.h 2009-10-05 21:06:22.000000000 +0100
27+++ trunk/libopkg/opkg.h 2009-10-05 21:06:35.000000000 +0100
28@@ -87,4 +87,6 @@
29
30 int opkg_repository_accessibility_check(opkg_t *opkg);
31
32+int opkg_compare_versions (const char *ver1, const char *ver2);
33+
34 #endif /* OPKG_H */