summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-09-02 07:31:10 -0400
committerGitHub <noreply@github.com>2021-09-02 07:31:10 -0400
commitc2ad0a0d40ff3860f6e48d2a8b5cb853a97f2543 (patch)
tree3ae05eb92636e4bff8331a0ecccd05ff6c37ce72
parentb8f952359723b2cf1013a3304a7a446ab5a1567e (diff)
parent3816ea6bb6a85b184b907b006957223926b411c7 (diff)
Merge pull request #9106 from opensourcerouting/clippy-elf-bsd-cond
lib/clippy: fix forgotten conditional
-rw-r--r--lib/elf_py.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/elf_py.c b/lib/elf_py.c
index b47aa3d795..1c306893ad 100644
--- a/lib/elf_py.c
+++ b/lib/elf_py.c
@@ -860,6 +860,7 @@ static PyObject *elffile_find_note(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+#ifdef HAVE_ELF_GETDATA_RAWCHUNK
static bool elffile_virt2file(struct elffile *w, GElf_Addr virt,
GElf_Addr *offs)
{
@@ -884,6 +885,7 @@ static bool elffile_virt2file(struct elffile *w, GElf_Addr virt,
return false;
}
+#endif /* HAVE_ELF_GETDATA_RAWCHUNK */
static PyObject *elffile_subscript(PyObject *self, PyObject *key)
{
@@ -1016,6 +1018,7 @@ static PyTypeObject typeobj_elffile = {
.tp_methods = methods_elffile,
};
+#ifdef HAVE_ELF_GETDATA_RAWCHUNK
static char *elfdata_strptr(Elf_Data *data, size_t offset)
{
char *p;
@@ -1124,6 +1127,7 @@ static void elffile_add_dynreloc(struct elffile *w, Elf_Data *reldata,
}
}
+#endif /* HAVE_ELF_GETDATA_RAWCHUNK */
/* primary (only, really) entry point to anything in this module */
static PyObject *elffile_load(PyTypeObject *type, PyObject *args,