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 build of socket.rs on FreeBSD #1075

Closed
wants to merge 0 commits into from
Closed

Conversation

yonas
Copy link

@yonas yonas commented Feb 14, 2024

Use OS X code for FreeBSD as well.

OS: FreeBSD 14
Sozu: e451177

@CLAassistant
Copy link

CLAassistant commented Feb 14, 2024

CLA assistant check
All committers have signed the CLA.

@yonas yonas force-pushed the main branch 2 times, most recently from 82f80be to a6ccba7 Compare February 14, 2024 03:01
@FlorentinDUBOIS
Copy link
Collaborator

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>) {}
Copy link
Member

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));
Copy link
Member

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?

Copy link
Member

@Keksoj Keksoj left a 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 🙏

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.

4 participants