mirror of
https://github.com/troglobit/libite.git
synced 2026-11-07 16:01:01 +00:00
Fix minor build error in new strndupa() header
Wrong path to local strnlen.h file. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
c1b3b76ea3
commit
12f619a320
2 files changed
+6
-12
No files matched your search
+3
-8
@@ -23,9 +23,8 @@
|
|||||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
* ==========================================================================
|
* ==========================================================================
|
||||||
*/
|
*/
|
||||||
#ifndef GNU_STRING_STRNDUPA_H
|
#ifndef LITE_STRNDUPA_H_
|
||||||
#define GNU_STRING_STRNDUPA_H
|
#define LITE_STRNDUPA_H_
|
||||||
|
|
||||||
|
|
||||||
#if !defined(HAVE_STRNDUPA)
|
#if !defined(HAVE_STRNDUPA)
|
||||||
#if defined(strndupa)
|
#if defined(strndupa)
|
||||||
@@ -33,14 +32,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !HAVE_STRNDUPA
|
#if !HAVE_STRNDUPA
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
|
|
||||||
#include <string.h> /* memcpy(3) */
|
#include <string.h> /* memcpy(3) */
|
||||||
|
#include "strnlen.h"
|
||||||
#include <gnu/string/strnlen.h>
|
|
||||||
|
|
||||||
#define strndupa(src, lim) (__extension__ ({ \
|
#define strndupa(src, lim) (__extension__ ({ \
|
||||||
size_t len_ = strnlen(src, lim); \
|
size_t len_ = strnlen(src, lim); \
|
||||||
@@ -54,5 +50,4 @@
|
|||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
#endif /* !HAVE_STRNDUPA */
|
#endif /* !HAVE_STRNDUPA */
|
||||||
|
|
||||||
|
|
||||||
#endif /* GNU_STRING_STRNDUPA_H */
|
#endif /* GNU_STRING_STRNDUPA_H */
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LITE_STRNLEN_H
|
#ifndef LITE_STRNLEN_H_
|
||||||
#define LITE_STRNLEN_H
|
#define LITE_STRNLEN_H_
|
||||||
|
|
||||||
#if !defined(HAVE_STRNLEN)
|
#if !defined(HAVE_STRNLEN)
|
||||||
#if defined(strnlen)
|
#if defined(strnlen)
|
||||||
@@ -24,7 +24,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !HAVE_STRNLEN
|
#if !HAVE_STRNLEN
|
||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
|
|
||||||
@@ -41,4 +40,4 @@ static inline size_t xstrnlen(const char *str, size_t lim)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* LITE_STRNLEN_H */
|
#endif /* LITE_STRNLEN_H_ */
|
||||||
Reference in new issue
Block a user