summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-02 09:03:12 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-02 09:03:12 -0500
commit29ae288dcc2673bb6af3d2f831002615f24e80e9 (patch)
tree2f1a4761138337997a2df07e8b4f048098a49f22
parenteff455bbec1a1c0200bd23b9b1851f36c0918208 (diff)
downloadgcompat-29ae288dcc2673bb6af3d2f831002615f24e80e9.tar.gz
gcompat-29ae288dcc2673bb6af3d2f831002615f24e80e9.tar.bz2
gcompat-29ae288dcc2673bb6af3d2f831002615f24e80e9.tar.xz
gcompat-29ae288dcc2673bb6af3d2f831002615f24e80e9.zip
string: Add __strdup
-rw-r--r--CHANGELOG.rst11
-rw-r--r--libgcompat/string.c10
2 files changed, 21 insertions, 0 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index fbdb762..3def808 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,12 @@ Build system
* Allow building against libobstack.
* Fix compatibility with Linux 4.17 and newer.
+* Travis CI is now used.
+
+Documentation
+-------------
+
+* README rewritten to conform to Adélie project standards.
malloc
------
@@ -27,6 +33,11 @@ pthread
* Add pthread_getname_np.
+string
+------
+
+* Add __strdup.
+
wchar
-----
diff --git a/libgcompat/string.c b/libgcompat/string.c
index f4e0620..9207db4 100644
--- a/libgcompat/string.c
+++ b/libgcompat/string.c
@@ -197,6 +197,16 @@ size_t __strcspn_c2(const char *str, int bad, int bad2)
}
/**
+ * Alias for strdup.
+ *
+ * LSB 5.0: LSB-Core-generic/baselib---strdup-1.html
+ */
+char *__strdup(const char *string)
+{
+ return strdup(string);
+}
+
+/**
* Concatenate a string with part of another, with buffer overflow checking.
*
* LSB 5.0: LSB-Core-generic/baselib---strncat-chk-1.html