Skip to contentSkip to conversation

package/libwebsockets: added option to (re-)enable external poll loop support

PATCH Superseded Luca Pesce via buildroot 2 participants 10 messages May 19, 2023 – May 24, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libwebsockets: added option to (re-)enable external poll loop support

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

For example, when libwebsockets in enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e

---
 package/libwebsockets/Config.in        | 10 ++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 14 insertions(+)
package/libwebsockets/Config.in +10 -0
index d7b529c..1371717 100644
@@ -9,5 +9,15 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
 	  https://libwebsockets.org/
 
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+	bool "enable external poll loop support"
+	default n
+	help
+	  Enable external poll loop support code.
+
+endif
+
 comment "libwebsockets needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
package/libwebsockets/libwebsockets.mk +4 -0
index fb0ee66..86756ca 100644
@@ -94,4 +94,8 @@ ifeq ($(BR2_SHARED_LIBS),y)
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON
+endif
+
 $(eval $(cmake-package))
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Luca, All,

On 2023-05-19 16:45 +0200, Luca Pesce via buildroot spake thusly:

Quoted 5 lines

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

So, as I understand it, before 3.2.0, this was unconditionally compiled in, right?

If so, for backward compatibility, should we default this new option to 'y' ?

Quoted 4 lines

For example, when libwebsockets in enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e

Then, should mosquitto also select this new option?

Quoted 11 lines
---
 package/libwebsockets/Config.in        | 10 ++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 14 insertions(+)
package/libwebsockets/Config.in +0 -0
index d7b529c..1371717 100644

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 16

Quoted 8 lines
package/libwebsockets/Config.in +5 -0
@@ -9,5 +9,15 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
 	  https://libwebsockets.org/
 
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+	bool "enable external poll loop support"
+	default n

'n' is the default, so no need to specify it.

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 18

Quoted 2 lines
package/libwebsockets/Config.in +2 -0
+	help
+	  Enable external poll loop support code.

I am not sure I understood this "external poll loop support". Does it mean that the loop must be handle by the application itself, rather than bey libwebsocket?

Regards,
Yann E. MORIN.

Quoted 24 lines
package/libwebsockets/Config.in +2 -0
+endif
+
 comment "libwebsockets needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
package/libwebsockets/libwebsockets.mk +4 -0
index fb0ee66..86756ca 100644
@@ -94,4 +94,8 @@ ifeq ($(BR2_SHARED_LIBS),y)
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON
+endif
+
 $(eval $(cmake-package))
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] R: [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support

Hi Yann,

Quoted 4 lines

Da: Yann E. MORIN <[email protected]>
Luca, All,

On 2023-05-19 16:45 +0200, Luca Pesce via buildroot spake thusly:

Quoted 8 lines
Quoted 5 lines

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

So, as I understand it, before 3.2.0, this was unconditionally compiled in, right?

Yes, indeed.

Quoted 2 lines

If so, for backward compatibility, should we default this new option to 'y' ?

Well, it is not clear to me why in libwebsockets >= 3.2.0 the new option defaults to OFF, but it is hinting to something not so broadly used - the comment of the commit which introduced that change says something:
https://github.com/warmcat/libwebsockets/commit/d3021980194991d175388115a65a4265bd155f36

So, I would say that the default should be n, and then let users enable it only if needed. Maybe the help text in the Config.in may remind that this support was unconditionally compiled in for version < 3.2.0.

Quoted 5 lines
Quoted 5 lines

For example, when libwebsockets in enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:

Then, should mosquitto also select this new option?

It could, yes. It is not a compile-time requirement, but rather a run-time one.

Quoted 14 lines
Quoted 14 lines
---
 package/libwebsockets/Config.in        | 10 ++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 14 insertions(+)
package/libwebsockets/Config.in +0 -0
index d7b529c..1371717 100644
@@ -9,5 +9,15 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
        https://libwebsockets.org/
 
Quoted 7 lines

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 16

Quoted 5 lines
package/libwebsockets/Config.in +5 -0
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+     bool "enable external poll loop support"
+     default n

'n' is the default, so no need to specify it.

Ok.

Quoted 6 lines

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 18

Quoted 2 lines
package/libwebsockets/Config.in +2 -0
+     help
+       Enable external poll loop support code.

I am not sure I understood this "external poll loop support". Does it mean that the loop must be handle by the application itself, rather than bey libwebsocket?

The library can be run on either its own internal loop (default behaviour) or by having its fds incorporated on an external one (so, the application own loop), using an application-provided callback. The latter is now under the aforementioned cmake option (see the cited commit above).

Regards,
Luca

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] R: [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support

Luca, All,

On 2023-05-22 06:34 +0000, Pesce Luca via buildroot spake thusly:

Quoted 11 lines
Quoted 11 lines

Da: Yann E. MORIN <[email protected]>
On 2023-05-19 16:45 +0200, Luca Pesce via buildroot spake thusly:

Quoted 5 lines

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

So, as I understand it, before 3.2.0, this was unconditionally compiled in, right?
If so, for backward compatibility, should we default this new option to 'y' ?

Quoted 8 lines

Well, it is not clear to me why in libwebsockets >= 3.2.0 the new option defaults to OFF, but it is hinting to something not so broadly used - the comment of the commit which introduced that change says something:
https://github.com/warmcat/libwebsockets/commit/d3021980194991d175388115a65a4265bd155f36

So, I would say that the default should be n, and then let users enable it only if needed. Maybe the help text in the Config.in may remind that this support was unconditionally compiled in for version < 3.2.0.

Our policy is not to change the default behaviour if at all possible, so I think this new symbol should default to 'y' (with a comment that states "legacy"):

default y # legacy, was previously always enabled

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

For example, when libwebsockets in enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
Then, should mosquitto also select this new option?

It could, yes. It is not a compile-time requirement, but rather a run-time one.

Then yes, mosquitto should select it (otherwise there is a performance regression).

[--SNIP--]

Quoted 9 lines
Quoted 5 lines

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 18

Quoted 2 lines
package/libwebsockets/Config.in +2 -0
+     help
+       Enable external poll loop support code.

I am not sure I understood this "external poll loop support". Does it mean that the loop must be handle by the application itself, rather than bey libwebsocket?

The library can be run on either its own internal loop (default behaviour) or by having its fds incorporated on an external one (so, the application own loop), using an application-provided callback. The latter is now under the aforementioned cmake option (see the cited commit above).

ACK, thansks for the clarification.

Will you submit an updated patch (default to y, and select from mosquitto) ?

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

[Buildroot] R: R: [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support

Hi Yann,

Quoted 2 lines

Will you submit an updated patch (default to y, and select from mosquitto) ?

Yes. Would you prefer a single patch dealing with both libwebsockets and mosquitto, or rather a serie with two patches, one for libwebsockets and the other for mosquitto? The latter sounds more correct to me, but I can do either way.

Regards,
Luca

________________________________________
Da: Yann E. MORIN <[email protected]>
Inviato: martedì 23 maggio 2023 18:27
A: Pesce Luca
Cc: [email protected]
Oggetto: Re: [Buildroot] R: [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support

Luca, All,

On 2023-05-22 06:34 +0000, Pesce Luca via buildroot spake thusly:

Quoted 11 lines
Quoted 11 lines

Da: Yann E. MORIN <[email protected]>
On 2023-05-19 16:45 +0200, Luca Pesce via buildroot spake thusly:

Quoted 5 lines

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

So, as I understand it, before 3.2.0, this was unconditionally compiled in, right?
If so, for backward compatibility, should we default this new option to 'y' ?

Quoted 8 lines

Well, it is not clear to me why in libwebsockets >= 3.2.0 the new option defaults to OFF, but it is hinting to something not so broadly used - the comment of the commit which introduced that change says something:
https://github.com/warmcat/libwebsockets/commit/d3021980194991d175388115a65a4265bd155f36

So, I would say that the default should be n, and then let users enable it only if needed. Maybe the help text in the Config.in may remind that this support was unconditionally compiled in for version < 3.2.0.

Our policy is not to change the default behaviour if at all possible, so I think this new symbol should default to 'y' (with a comment that states "legacy"):

default y # legacy, was previously always enabled

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines

For example, when libwebsockets in enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
Then, should mosquitto also select this new option?

It could, yes. It is not a compile-time requirement, but rather a run-time one.

Then yes, mosquitto should select it (otherwise there is a performance regression).

[--SNIP--]

Quoted 9 lines
Quoted 5 lines

package/libwebsockets/Config.in config BR2_PACKAGE_LIBWEBSOCKETS · line 18

Quoted 2 lines
package/libwebsockets/Config.in +2 -0
+     help
+       Enable external poll loop support code.

I am not sure I understood this "external poll loop support". Does it mean that the loop must be handle by the application itself, rather than bey libwebsocket?

The library can be run on either its own internal loop (default behaviour) or by having its fds incorporated on an external one (so, the application own loop), using an application-provided callback. The latter is now under the aforementioned cmake option (see the cited commit above).

ACK, thansks for the clarification.

Will you submit an updated patch (default to y, and select from mosquitto) ?

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

Re: [Buildroot] R: R: [PATCH 1/1] package/libwebsockets: added option to (re-)enable external poll loop support

Luca, All,

On 2023-05-24 06:00 +0000, Pesce Luca via buildroot spake thusly:

Quoted 6 lines
Quoted 2 lines

Will you submit an updated patch (default to y, and select from mosquitto) ?

Yes. Would you prefer a single patch dealing with both libwebsockets and mosquitto, or rather a serie with two patches, one for libwebsockets and the other for mosquitto? The latter sounds more correct to me, but I can do either way.

I think it would be better with two patches, please.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v2 1/2 package/libwebsockets: added option to (re-)enable external poll loop support

In reply to Luca Pesce via buildroot

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

For example, when libwebsockets is enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e

---
 package/libwebsockets/Config.in        | 12 ++++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 16 insertions(+)
package/libwebsockets/Config.in +12 -0
index d7b529c..05c1326 100644
@@ -9,5 +9,17 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
 	  https://libwebsockets.org/
 
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+	bool "enable external poll loop support"
+	default y  # legacy, was previously always enabled
+	help
+	  Enable external poll loop support code. This was
+	  unconditionally compiled in for library versions
+	  prior to 3.2.0.
+
+endif
+
 comment "libwebsockets needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
package/libwebsockets/libwebsockets.mk +4 -0
index fb0ee66..86756ca 100644
@@ -94,4 +94,8 @@ ifeq ($(BR2_SHARED_LIBS),y)
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON
+endif
+
 $(eval $(cmake-package))
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

PATCH v2 2/2 package/mosquitto: when building with libwebsockets support, select its external loop support option

When libwebsockets is enabled, mosquitto broker is built with websocket support, but its code requires libwebsockets being built with external loop option - otherwise, mosquitto gives a compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e
To fix this, select the BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL option.

---
 package/mosquitto/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/mosquitto/Config.in +1 -0
index 6fa5f79..8bedf2a 100644
@@ -25,6 +25,7 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # include <dlfcn.h>
 	depends on BR2_PACKAGE_MOSQUITTO
+	select BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL if BR2_PACKAGE_LIBWEBSOCKETS
 	help
 	  Build and install the mosquitto broker onto target.
 
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

Re: [Buildroot] [PATCH v2 2/2] package/mosquitto: when building with libwebsockets support, select its external loop support option

Luca, All,

On 2023-05-24 10:31 +0200, Luca Pesce spake thusly:

Quoted 8 lines

When libwebsockets is enabled, mosquitto broker is built with websocket support, but its code requires libwebsockets being built with external loop option - otherwise, mosquitto gives a compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e
To fix this, select the BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL option.

As I applied the libwebsockets option to next, so did I for this patch.

Applied to next, thanks.

Regards,
Yann E. MORIN.

Quoted 19 lines
---
 package/mosquitto/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/mosquitto/Config.in +1 -0
index 6fa5f79..8bedf2a 100644
@@ -25,6 +25,7 @@ config BR2_PACKAGE_MOSQUITTO_BROKER
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS # include <dlfcn.h>
 	depends on BR2_PACKAGE_MOSQUITTO
+	select BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL if BR2_PACKAGE_LIBWEBSOCKETS
 	help
 	  Build and install the mosquitto broker onto target.
 
Signature · 1 line
2.7.4
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw
In reply to Luca Pesce via buildroot

Luca, All,

On 2023-05-24 10:31 +0200, Luca Pesce spake thusly:

Quoted 6 lines

Since version 3.2.0, libwebsockets does not compile its external loop support code anymore. That code was put under LWS_WITH_EXTERNAL_POLL compile option, which defaults to OFF.
Applications relying on that support need to turn that option on, so let's add it to the package.

Quoted 6 lines

For example, when libwebsockets is enabled, mosquitto broker is built with websocket support, but its code requires LWS_WITH_EXTERNAL_POLL to be on - otherwise, it gives compile-time warning hinting to unusable websocket support:
https://github.com/eclipse/mosquitto/commit/1b24f625ea4ee77f3c4796ec2233d059f8c7977e

I pondered whether this should go into master or next, and decided it was not critical enough to go to master.

Indeed, extenal loop support has been disabled since we bumped to 3.2.0, in commit dda92e2f58d4 (package/libwebsockets: bump version to 3.2.0), back in October 2019.

So clearly, this was not that critical, as you're the first to notice in such a long time.

Applied to next, thanks.

Regards,
Yann E. MORIN.

Quoted 43 lines
---
 package/libwebsockets/Config.in        | 12 ++++++++++++
 package/libwebsockets/libwebsockets.mk |  4 ++++
 2 files changed, 16 insertions(+)
package/libwebsockets/Config.in +12 -0
index d7b529c..05c1326 100644
@@ -9,5 +9,17 @@ config BR2_PACKAGE_LIBWEBSOCKETS
 
 	  https://libwebsockets.org/
 
+if BR2_PACKAGE_LIBWEBSOCKETS
+
+config BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL
+	bool "enable external poll loop support"
+	default y  # legacy, was previously always enabled
+	help
+	  Enable external poll loop support code. This was
+	  unconditionally compiled in for library versions
+	  prior to 3.2.0.
+
+endif
+
 comment "libwebsockets needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
package/libwebsockets/libwebsockets.mk +4 -0
index fb0ee66..86756ca 100644
@@ -94,4 +94,8 @@ ifeq ($(BR2_SHARED_LIBS),y)
 LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS_EXT_POLL),y)
+LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_EXTERNAL_POLL=ON
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.7.4
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot