Commit 5389005d9376e3155721a90f34612b5ca618c98d

Josh Triplett 2012-08-11T18:14:07

Export git_attr_value Commit 0c9eacf3d2c83256736a5bb2a240e73afd13d55f introduced the function git_attr_value and switched the GIT_ATTR_* macros to use it, but attempting to use that function leads to a linker error (undefined reference to `git_attr_value'). Export git_attr_value so programs can actually call it.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/include/git2/attr.h b/include/git2/attr.h
index d675f75..2de9f4b 100644
--- a/include/git2/attr.h
+++ b/include/git2/attr.h
@@ -96,7 +96,7 @@ typedef enum {
  *	@param attr The attribute
  *	@return the value type for the attribute
  */
-git_attr_t git_attr_value(const char *attr);
+GIT_EXTERN(git_attr_t) git_attr_value(const char *attr);
 
 /**
  * Check attribute flags: Reading values from index and working directory.