[PR #987] [MERGED] Support undefined CURLoption in libcurl library used in build #1742

Closed
opened 2026-03-04 02:01:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/987
Author: @ggtakec
Created: 3/22/2019
Status: Merged
Merged: 3/22/2019
Merged by: @ggtakec

Base: masterHead: master


📝 Commits (1)

  • 7176603 Support undefined CURLoption in libcurl library used in build

📊 Changes

3 files changed (+87 additions, -3 deletions)

View changed files

📝 configure.ac (+45 -0)
📝 src/curl.cpp (+9 -3)
📝 src/curl.h (+33 -0)

📄 Description

Relevant Issue (if applicable)

#976 #935

Details

Maintaining an SSL session with CURL will improve performance, and s3fs should use the CURLOPT_TCP_KEEPALIVE, CURLOPT_KEEP_SENDING_ON_ERROR and CURLOPT_SSL_ENABLE_ALPN CURLoptions for curl_easy_setopt().

However, the version of libcurl you use when building may not support these options.

This PR can create s3fs regardless of the version of libcurl used in the build.
That is, if these options are not defined in curl.h, these options will be defined in the s3fs header file and used.
Certainly, defining option values ​​in curl.h to be present in s3fs may not be good, but we expect that libcurl will not change the defined values ​​and assign a fixed value.
So far, this PR allows you to build s3fs without reliance on the libcurl version.

More details

configure output

When you start configure, the following message is output.
It will output "no" if the target option is undefined.

checking checking CURLOPT_TCP_KEEPALIVE... (yes or no)
checking checking CURLOPT_SSL_ENABLE_ALPN... (yes or no)
checking checking CURLOPT_KEEP_SENDING_ON_ERROR... (yes or no)

common.h

In this header file, CURLOPT_TCP_KEEPALIVE, CURLOPT_KEEP_SENDING_ON_ERROR and CURLOPT_SSL_ENABLE_ALPN CURLoptions are defined with S3FS prefix.
And s3fs calls curl_easy_setopt () using the S3FS prefix symbol.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/987 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 3/22/2019 **Status:** ✅ Merged **Merged:** 3/22/2019 **Merged by:** [@ggtakec](https://github.com/ggtakec) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`7176603`](https://github.com/s3fs-fuse/s3fs-fuse/commit/71766039ff236682b78b3b959971f5b15c2f83a8) Support undefined CURLoption in libcurl library used in build ### 📊 Changes **3 files changed** (+87 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `configure.ac` (+45 -0) 📝 `src/curl.cpp` (+9 -3) 📝 `src/curl.h` (+33 -0) </details> ### 📄 Description ## Relevant Issue (if applicable) #976 #935 ## Details Maintaining an SSL session with CURL will improve performance, and s3fs should use the CURLOPT_TCP_KEEPALIVE, CURLOPT_KEEP_SENDING_ON_ERROR and CURLOPT_SSL_ENABLE_ALPN CURLoptions for curl_easy_setopt(). However, the version of libcurl you use when building may not support these options. This PR can create s3fs regardless of the version of libcurl used in the build. That is, if these options are not defined in curl.h, these options will be defined in the s3fs header file and used. Certainly, defining option values ​​in curl.h to be present in s3fs may not be good, but we expect that libcurl will not change the defined values ​​and assign a fixed value. So far, this PR allows you to build s3fs without reliance on the libcurl version. ### More details #### configure output When you start configure, the following message is output. It will output "no" if the target option is undefined. ``` checking checking CURLOPT_TCP_KEEPALIVE... (yes or no) checking checking CURLOPT_SSL_ENABLE_ALPN... (yes or no) checking checking CURLOPT_KEEP_SENDING_ON_ERROR... (yes or no) ``` #### common.h In this header file, CURLOPT_TCP_KEEPALIVE, CURLOPT_KEEP_SENDING_ON_ERROR and CURLOPT_SSL_ENABLE_ALPN CURLoptions are defined with S3FS prefix. And s3fs calls curl_easy_setopt () using the S3FS prefix symbol. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:01:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1742
No description provided.