• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/elfutils/0003-fts.patch
Vicente Olivert RieraVicente Olivert Riera committed 794ae61a15f17 Jun 2016
Raw file
Source viewDiff to previous
+ * of the file is in the directory entry.  Otherwise, we assume that the number
 
1
Add an implementation of the fts_*() functions
2
​
3
The fts_*() functions are optional in uClibc, and not compiled in our
4
default configuration. The best option would be to migrate this
5
elfutils code to the nftw family of functions, but it requires quite
6
some work.
7
​
8
So we have several options here:
9
​
10
 *) Enable fts_*() functions in our default uClibc configuration. Not
11
    nice since only one package needs them (the help text of uClibc
12
    for fts_*() functions explicitly mention that they have been added
13
    to be able to build elfutils).
14
​
15
 *) Use gnulib, but it is quite heavy to setup, requires modifications
16
    to configure.ac, and other things.
17
​
18
 *) Copy the fts function from uClibc into elfutils source code. This
19
    is the solution used below. uClibc is LGPL, and elfutils is
20
    LGPL/GPL, so there should not be any licensing issue.
21
​
22
Of course, the fts_*() functions are only built if they are not
23
already provided by the C library.
24
​
25
Based on the former patch by Thomas Petazzoni.
26
​
27
[Vincent: tweak patch for 0.166]
28
​
29
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
30
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
31
​
32
diff -Nrup a/configure.ac b/configure.ac
33
--- a/configure.ac  2016-06-17 14:47:03.561704498 +0100
34
+++ b/configure.ac  2016-06-17 14:52:35.038200412 +0100
35
@@ -259,6 +259,10 @@ AC_ARG_ENABLE([progs],
36
    enable_progs=yes)
37
 AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes)
38
 
39
+AC_CHECK_HEADER([fts.h],
40
+   AC_DEFINE([HAVE_FTS_H], [], [Define if <fts.h> is available in C library]))
41
+AM_CONDITIONAL(HAVE_FTS, test "$ac_cv_header_fts_h" = yes)
42
+
43
 dnl zlib is mandatory.
44
 save_LIBS="$LIBS"
45
 LIBS=
46
diff -Nrup a/libdwfl/fts.c b/libdwfl/fts.c
47
--- a/libdwfl/fts.c 1970-01-01 01:00:00.000000000 +0100
48
+++ b/libdwfl/fts.c 2016-06-17 14:57:26.649912084 +0100
49
@@ -0,0 +1,1095 @@
50
+/*-
51
+ * Copyright (c) 1990, 1993, 1994
52
+ * The Regents of the University of California.  All rights reserved.
53
+ *
54
+ * Redistribution and use in source and binary forms, with or without
55
+ * modification, are permitted provided that the following conditions
56
+ * are met:
57
+ * 1. Redistributions of source code must retain the above copyright
58
+ *    notice, this list of conditions and the following disclaimer.
59
+ * 2. Redistributions in binary form must reproduce the above copyright
60
+ *    notice, this list of conditions and the following disclaimer in the
61
+ *    documentation and/or other materials provided with the distribution.
62
+ * 4. Neither the name of the University nor the names of its contributors
63
+ *    may be used to endorse or promote products derived from this software
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.