Skip to content

Problem: undefined symbol _xdl_regexec_buf when linking with libxdiff #5

Open
@yrashk

Description

@yrashk

(referenced from xdiffi.c)

This fixes the problem, but to be honest I am not sure why, it should have picked up inlined from the header xdl_regexec_buf 🤔

diff --git a/git-xdiff.h b/git-xdiff.h
index 4091d22..673b5b6 100644
--- a/git-xdiff.h
+++ b/git-xdiff.h
@@ -64,7 +64,7 @@ inline int xdl_regexec_buf(
 # define xdl_regex_t regex_t
 # define xdl_regmatch_t regmatch_t
 
-inline int xdl_regexec_buf(
+static inline int xdl_regexec_buf(
 	const xdl_regex_t *preg, const char *buf, size_t size,
 	size_t nmatch, xdl_regmatch_t pmatch[], int eflags)
 {

When not linking but simply building xdiff, this error does not happen, but I can see that it is an undefined symbol (using nm):

                 U _xdl_regexec_buf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions