summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c')
-rw-r--r--t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c
new file mode 100644
index 0000000..aa323d5
--- /dev/null
+++ b/t/recipes/checks/debian/shlibs/shared-libs-unversioned/build-spec/orig/foo.c
@@ -0,0 +1,24 @@
+/*
+ * Be sure that this library uses a function from libc. Otherwise, gcc is
+ * smart enough not to link it with libc and we get more tags for missing
+ * dependency lines.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+int
+foo(int num)
+{
+ printf("%d\n", num);
+ return num * 42;
+}