-
Notifications
You must be signed in to change notification settings - Fork 189
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 build of socket.rs on FreeBSD #1075
Conversation
82f80be
to
a6ccba7
Compare
Hello @yonas, thanks you for this contribution |
bin/src/main.rs
Outdated
@@ -163,7 +163,7 @@ fn set_workers_affinity(workers: &Vec<WorkerSession>) { | |||
/// Can bind multiple processes to a CPU core if there are more processes | |||
/// than CPU cores. Only works on Linux. | |||
#[cfg(not(target_os = "linux"))] | |||
fn set_workers_affinity(_: &Vec<Worker>) {} | |||
fn set_workers_affinity(_: &Vec<cli::SubCmd>) {} |
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.
please import the Worker type instead. Or is there a reason you switched to this type?
bin/src/util.rs
Outdated
@@ -118,18 +121,18 @@ pub fn get_config_file_path(args: &cli::Args) -> Result<&str, UtilError> { | |||
pub unsafe fn get_executable_path() -> Result<String, UtilError> { | |||
let mut capacity = PATH_MAX as usize; | |||
let mut path: Vec<u8> = Vec::with_capacity(capacity); | |||
path.extend(repeat(0).take(capacity)); | |||
path.extend(std::iter::repeat(0).take(capacity)); |
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.
can you import those at the top of the file instead?
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.
i trust it works on your machine.
@fredalix would you have time to check that this branch builds on freebsd? I know you use it :-)
sudo pkg install rust
git clone [email protected]:yonasBSD/sozu.git
cd sozu
cargo build
Only if you have the time 🙏
Use OS X code for FreeBSD as well.
OS:
FreeBSD 14
Sozu: e451177