Work-around for an obscure gcc 2.95.3 bug: It complained about ambiguity
of fssh_stat struct and function. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20932 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+12
-11
@@ -27,6 +27,7 @@
|
||||
#include "fssh_unistd.h"
|
||||
#include "hash.h"
|
||||
#include "KPath.h"
|
||||
#include "posix_compatibility.h"
|
||||
#include "syscalls.h"
|
||||
|
||||
|
||||
@@ -4964,17 +4965,17 @@ _kern_access(const char *path, int mode)
|
||||
|
||||
fssh_status_t
|
||||
_kern_read_stat(int fd, const char *path, bool traverseLeafLink,
|
||||
struct fssh_stat *stat, fssh_size_t statSize)
|
||||
struct ::fssh_stat *stat, fssh_size_t statSize)
|
||||
{
|
||||
struct fssh_stat completeStat;
|
||||
struct fssh_stat *originalStat = NULL;
|
||||
struct ::fssh_stat completeStat;
|
||||
struct ::fssh_stat *originalStat = NULL;
|
||||
fssh_status_t status;
|
||||
|
||||
if (statSize > sizeof(struct fssh_stat))
|
||||
if (statSize > sizeof(struct ::fssh_stat))
|
||||
return FSSH_B_BAD_VALUE;
|
||||
|
||||
// this supports different stat extensions
|
||||
if (statSize < sizeof(struct fssh_stat)) {
|
||||
if (statSize < sizeof(struct ::fssh_stat)) {
|
||||
originalStat = stat;
|
||||
stat = &completeStat;
|
||||
}
|
||||
@@ -5033,16 +5034,16 @@ _kern_read_stat(int fd, const char *path, bool traverseLeafLink,
|
||||
|
||||
fssh_status_t
|
||||
_kern_write_stat(int fd, const char *path, bool traverseLeafLink,
|
||||
const struct fssh_stat *stat, fssh_size_t statSize, int statMask)
|
||||
const struct ::fssh_stat *stat, fssh_size_t statSize, int statMask)
|
||||
{
|
||||
struct fssh_stat completeStat;
|
||||
struct ::fssh_stat completeStat;
|
||||
|
||||
if (statSize > sizeof(struct fssh_stat))
|
||||
if (statSize > sizeof(struct ::fssh_stat))
|
||||
return FSSH_B_BAD_VALUE;
|
||||
|
||||
// this supports different stat extensions
|
||||
if (statSize < sizeof(struct fssh_stat)) {
|
||||
fssh_memset((uint8_t *)&completeStat + statSize, 0, sizeof(struct fssh_stat) - statSize);
|
||||
if (statSize < sizeof(struct ::fssh_stat)) {
|
||||
fssh_memset((uint8_t *)&completeStat + statSize, 0, sizeof(struct ::fssh_stat) - statSize);
|
||||
fssh_memcpy(&completeStat, stat, statSize);
|
||||
stat = &completeStat;
|
||||
}
|
||||
@@ -5133,7 +5134,7 @@ _kern_create_index(fssh_dev_t device, const char *name, uint32_t type, uint32_t
|
||||
|
||||
|
||||
fssh_status_t
|
||||
_kern_read_index_stat(fssh_dev_t device, const char *name, struct fssh_stat *stat)
|
||||
_kern_read_index_stat(fssh_dev_t device, const char *name, struct ::fssh_stat *stat)
|
||||
{
|
||||
return index_name_read_stat(device, name, stat, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user