summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2012-04-23 16:37:23 +0000
committerSylvestre Ledru <sylvestre@debian.org>2012-04-23 16:37:23 +0000
commit3099f4bda82ab231422c5dbbb815816b58724998 (patch)
tree944b10c678d798edc0dc13dba5cc2c30eee79981 /llvm/lib/Support
parent16c4a4f471b9ada6e9d67c812786724d4c33872f (diff)
downloadbcm5719-llvm-3099f4bda82ab231422c5dbbb815816b58724998.tar.gz
bcm5719-llvm-3099f4bda82ab231422c5dbbb815816b58724998.zip
Conflict with st_dev/st_ino identifiers under Debian GNU/Hurd
The problem is that the struct file_status on UNIX systems has two members called st_dev and st_ino; those are also members of the struct stat, and they are reserved identifiers which can also be provided as #define (and this is the case for st_dev on Hurd). The solution (attached) is to rename them, for example adding a "fs_" prefix (= file status) to them. Patch by Pino Toscano llvm-svn: 155354
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Unix/PathV2.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc
index edb101efb0f..5f22f8e674a 100644
--- a/llvm/lib/Support/Unix/PathV2.inc
+++ b/llvm/lib/Support/Unix/PathV2.inc
@@ -285,8 +285,8 @@ error_code exists(const Twine &path, bool &result) {
bool equivalent(file_status A, file_status B) {
assert(status_known(A) && status_known(B));
- return A.st_dev == B.st_dev &&
- A.st_ino == B.st_ino;
+ return A.fs_st_dev == B.fs_st_dev &&
+ A.fs_st_ino == B.fs_st_ino;
}
error_code equivalent(const Twine &A, const Twine &B, bool &result) {
@@ -340,8 +340,8 @@ error_code status(const Twine &path, file_status &result) {
else
result = file_status(file_type::type_unknown);
- result.st_dev = status.st_dev;
- result.st_ino = status.st_ino;
+ result.fs_st_dev = status.st_dev;
+ result.fs_st_ino = status.st_ino;
return error_code::success();
}
OpenPOWER on IntegriCloud