mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
18 lines
359 B
C
18 lines
359 B
C
#ifndef _LIBIBVERBS_ALLOCA_H_
|
|
#define _LIBIBVERBS_ALLOCA_H_
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
#define strdupa(_s) \
|
|
({ \
|
|
char *_d; \
|
|
int _len; \
|
|
\
|
|
_len = strlen(_s) + 1; \
|
|
_d = alloca(_len); \
|
|
if (_d) \
|
|
memcpy(_d, _s, _len); \
|
|
_d; \
|
|
})
|
|
#endif /* _LIBIBVERBS_ALLOCA_H_ */
|