Eliminate improper consts and allow standard version to override.
This commit is contained in:
parent
ac20ce1924
commit
80f6d55836
@ -259,7 +259,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid);
|
|||||||
extern struct hostent *xgethostbyname(const char *name);
|
extern struct hostent *xgethostbyname(const char *name);
|
||||||
extern int create_icmp_socket(void);
|
extern int create_icmp_socket(void);
|
||||||
|
|
||||||
char *dirname (const char *path);
|
char *dirname (char *path);
|
||||||
|
|
||||||
int make_directory (char *path, long mode, int flags);
|
int make_directory (char *path, long mode, int flags);
|
||||||
|
|
||||||
|
@ -22,12 +22,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
|
#if defined __UCLIBC__ || __GNU_LIBRARY___ < 5
|
||||||
|
|
||||||
/* Return a string containing the path name of the parent
|
/* Return a string containing the path name of the parent
|
||||||
* directory of PATH. */
|
* directory of PATH. */
|
||||||
|
|
||||||
char *dirname(const char *path)
|
char *dirname(char *path)
|
||||||
{
|
{
|
||||||
const char *s;
|
char *s;
|
||||||
|
|
||||||
/* Go to the end of the string. */
|
/* Go to the end of the string. */
|
||||||
s = path + strlen(path) - 1;
|
s = path + strlen(path) - 1;
|
||||||
@ -49,3 +51,5 @@ char *dirname(const char *path)
|
|||||||
s[1] = '\0';
|
s[1] = '\0';
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -259,7 +259,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid);
|
|||||||
extern struct hostent *xgethostbyname(const char *name);
|
extern struct hostent *xgethostbyname(const char *name);
|
||||||
extern int create_icmp_socket(void);
|
extern int create_icmp_socket(void);
|
||||||
|
|
||||||
char *dirname (const char *path);
|
char *dirname (char *path);
|
||||||
|
|
||||||
int make_directory (char *path, long mode, int flags);
|
int make_directory (char *path, long mode, int flags);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user