[haiku-commits] haiku: hrev53561 - src/libs/compat/freebsd_iflib

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Oct 2019 21:17:54 -0400 (EDT)

hrev53561 adds 1 changeset to branch 'master'
old head: d79013ecaa98580b9837fd509c7901b93386b545
new head: c903bc728b0443dc8c2bc876f5ac225195649959
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=c903bc728b04+%5Ed79013ecaa98

----------------------------------------------------------------------------

c903bc728b04: freebsd_iflib: Fix usage of kobj_lookup_method.
  
  Should solve #15441. We should probably enable -Werror=incompatible-ptr
  globally to avoid this in the future...

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53561
Commit:      c903bc728b0443dc8c2bc876f5ac225195649959
URL:         https://git.haiku-os.org/haiku/commit/?id=c903bc728b04
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Oct 24 01:11:42 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/15441

----------------------------------------------------------------------------

1 file changed, 8 insertions(+)
src/libs/compat/freebsd_iflib/iflib.c | 8 ++++++++

----------------------------------------------------------------------------

diff --git a/src/libs/compat/freebsd_iflib/iflib.c 
b/src/libs/compat/freebsd_iflib/iflib.c
index 1099377a43..ef52deb9ad 100644
--- a/src/libs/compat/freebsd_iflib/iflib.c
+++ b/src/libs/compat/freebsd_iflib/iflib.c
@@ -4810,7 +4810,11 @@ iflib_device_register(device_t dev, void *sc, 
if_shared_ctx_t sctx, if_ctx_t *ct
                 * aren't the default NULL implementation.
                 */
                kobj_desc = &ifdi_rx_queue_intr_enable_desc;
+#ifdef __HAIKU__
+               kobj_method = kobj_lookup_method(ctx->ops.cls, NULL,
+#else
                kobj_method = kobj_lookup_method(((kobj_t)ctx), NULL,
+#endif
                    kobj_desc);
                if (kobj_method == &kobj_desc->deflt) {
                        device_printf(dev,
@@ -4819,7 +4823,11 @@ iflib_device_register(device_t dev, void *sc, 
if_shared_ctx_t sctx, if_ctx_t *ct
                        goto fail_queues;
                }
                kobj_desc = &ifdi_tx_queue_intr_enable_desc;
+#ifdef __HAIKU__
+               kobj_method = kobj_lookup_method(ctx->ops.cls, NULL,
+#else
                kobj_method = kobj_lookup_method(((kobj_t)ctx), NULL,
+#endif
                    kobj_desc);
                if (kobj_method == &kobj_desc->deflt) {
                        device_printf(dev,


Other related posts:

  • » [haiku-commits] haiku: hrev53561 - src/libs/compat/freebsd_iflib - waddlesplash