Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XrdPosixAdmin.cc #1902

Merged
merged 1 commit into from
Feb 9, 2023
Merged

Update XrdPosixAdmin.cc #1902

merged 1 commit into from
Feb 9, 2023

Conversation

costing
Copy link
Contributor

@costing costing commented Feb 8, 2023

Fixes compilation issue on older gcc

/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc: In member function ‘XrdCl::URL* XrdPosixAdmin::FanOut(int&)’:
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:32: error: ‘ptrdiff_t’ was not declared in this scope
    if (i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL))
                                ^
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:32: note: suggested alternatives:
In file included from /usr/include/c++/5/limits:42:0,
                 from /usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:32:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note:   ‘std::ptrdiff_t’
   typedef __PTRDIFF_TYPE__ ptrdiff_t;
                            ^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note:   ‘std::ptrdiff_t’
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:41: error: template argument 1 is invalid
    if (i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL))
                                         ^
src/CMakeFiles/XrdPosix.dir/build.make:62: recipe for target 'src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixAdmin.cc.o' failed
make[2]: *** [src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixAdmin.cc.o] Error 1

Fixes compilation issue on older gcc

```
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc: In member function ‘XrdCl::URL* XrdPosixAdmin::FanOut(int&)’:
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:32: error: ‘ptrdiff_t’ was not declared in this scope
    if (i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL))
                                ^
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:32: note: suggested alternatives:
In file included from /usr/include/c++/5/limits:42:0,
                 from /usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:32:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note:   ‘std::ptrdiff_t’
   typedef __PTRDIFF_TYPE__ ptrdiff_t;
                            ^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:197:28: note:   ‘std::ptrdiff_t’
/usr/src/xrootd-5.5.2/src/XrdPosix/XrdPosixAdmin.cc:70:41: error: template argument 1 is invalid
    if (i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL))
                                         ^
src/CMakeFiles/XrdPosix.dir/build.make:62: recipe for target 'src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixAdmin.cc.o' failed
make[2]: *** [src/CMakeFiles/XrdPosix.dir/XrdPosix/XrdPosixAdmin.cc.o] Error 1
```
@amadio amadio merged commit f190473 into xrootd:master Feb 9, 2023
@costing costing deleted the patch-1 branch February 9, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants