summaryrefslogtreecommitdiff
path: root/librabbitmq/utils/strdup.h
blob: 15717638bfb929aa080adf1079fba79cd2d32e87 (plain)
1
2
3
4
5
6
7
8
9
10
#ifndef LIBRABBITMQ_STRDUP_H_
#define LIBRABBITMQ_STRDUP_H_
/* strdup is not in ISO C90!
 * we define it here for easy inclusion
 */
static inline char *strdup(const char *str)
{
  return strcpy(malloc(strlen(str) + 1),str);
}
#endif