-
Notifications
You must be signed in to change notification settings - Fork 318
Allow build on Solaris 11.4 #2453
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2370,7 +2370,11 @@ lys_search_localfile_file_type(const struct dirent *file, const char *wd, struct | |
|
|
||
| *skip = 0; | ||
|
|
||
| #ifdef __sun__ | ||
| if (1) { | ||
| #else | ||
| if ((file->d_type == DT_UNKNOWN) || (file->d_type == DT_LNK)) { | ||
| #endif | ||
|
Comment on lines
+2373
to
+2377
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please explain because just looking at this I do not understand.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, then it should ideally be properly detected in by |
||
| /* FS does not support this field or its a symbolic link, need to call stat */ | ||
| if (asprintf(&str, "%s/%s", wd, file->d_name) == -1) { | ||
| LOGMEM(NULL); | ||
|
|
@@ -2387,13 +2391,17 @@ lys_search_localfile_file_type(const struct dirent *file, const char *wd, struct | |
| /* stat - file */ | ||
| is_reg = 1; | ||
| } | ||
| #ifdef __sun__ | ||
| } | ||
| #else | ||
| } else if (file->d_type == DT_DIR) { | ||
| /* dirent - dir */ | ||
| is_dir = 1; | ||
| } else if (file->d_type == DT_REG) { | ||
| /* dirent - file */ | ||
| is_reg = 1; | ||
| } | ||
| #endif | ||
|
|
||
| if (is_dir && (dirs->count || !implicit_cwd)) { | ||
| /* we have another subdirectory in searchpath to explore, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but the C standard needs to be specified because various compilers use different default standards. And before deciding the exact solution I would like to know the details of the issue. Is the compiler too old on Solaris that does not support this C revision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, declarations for
vasprintfandstrndupare missing:Note that you can play with Solaris via https://github.com/vmactions/shell-solaris .
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like there are some macro definitions missing, you can learn about those in the man pages. The VM seems nice but to have a lasting effect we would need to add it into our automatic actions, which does not seem possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for macros. This is also possibiltiy:
As for Solaris CI. It's possible: https://github.com/rust-lang/libc/blob/d58c1f4f9ae01648b342d7dead291d08655677c4/.github/workflows/ci.yaml#L278
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine although the macro looks very non-standard. Better adding macros than changing the C standard. As for the CI, I may take a look at it later and add an action for Solaris in our CI.