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

Fix libstd on DragonFly #32687

Merged
merged 1 commit into from
Apr 8, 2016
Merged

Fix libstd on DragonFly #32687

merged 1 commit into from
Apr 8, 2016

Conversation

mneumann
Copy link
Contributor

@mneumann mneumann commented Apr 2, 2016

Following changes:

  • birthtime does not exist on DragonFly
  • errno: __dfly_error is no more. Use #[thread_local] static errno.
  • clock_gettime expects a c_ulong

These changes are required to build DragonFly snapshots again.

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

libc::clock_gettime(clock as libc::c_ulong, &mut t.t)
}).unwrap();
t
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the duplication here be reduced from the whole function to just perhaps a typedef?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either that or the now here could take an argument of the appropriate type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would export the type as clock_t from libc, then we could just use it here. But I think in this case a typedef is just fine!

Following changes:

* birthtime does not exist on DragonFly
* errno: __dfly_error is no more. Use #[thread_local] static errno.
* clock_gettime expects a c_ulong (use a type alias)

These changes are required to build DragonFly snapshots again.
@mneumann
Copy link
Contributor Author

mneumann commented Apr 7, 2016

@aturon @alexcrichton I rebased and squashed into a single commit. for some unknown reason the travis build shows a failed state (it successfully ran the tests).

@alexcrichton
Copy link
Member

@bors: r+ 60c988e

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 7, 2016
…excrichton

Fix libstd on DragonFly

Following changes:

* birthtime does not exist on DragonFly
* errno: __dfly_error is no more. Use #[thread_local] static errno.
* clock_gettime expects a c_ulong

These changes are required to build DragonFly snapshots again.
bors added a commit that referenced this pull request Apr 7, 2016
Rollup of 7 pull requests

- Successful merges: #32687, #32729, #32731, #32732, #32734, #32737, #32741
- Failed merges:
@bors bors merged commit 60c988e into rust-lang:master Apr 8, 2016
@mneumann mneumann deleted the dragonfly_fix_libstd branch April 9, 2016 09:36
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.

5 participants