Summary: | [PATCH] Fix building under musl-libc with canonicalize_file_name() | ||
---|---|---|---|
Product: | libqmi | Reporter: | Stuart Cardall <developer> |
Component: | libqmi | Assignee: | Dan Williams <dcbw> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | developer |
Version: | unspecified | Keywords: | patch |
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Musl libc compat for canonicalize_file_name()
Musl libc compat for canonicalize_file_name() patch including static func in impl instead of as a inline in header |
Description
Stuart Cardall
2017-02-24 14:56:24 UTC
Created attachment 129898 [details] [review] Musl libc compat for canonicalize_file_name() Created attachment 130392 [details] [review] Musl libc compat for canonicalize_file_name() while building libqmi 1.18.0 I noticed warnings from gcc to include <stdio.h> in src/libqmi-glib/qmi-utils.h this is a revised patch with the extra include for musl libc The suggested patch creates an issue with packages like modem-manager since the header is used as a interface definition to the libqmi library. Instead, suggesting the new attached patch. Created attachment 131359 [details] [review] patch including static func in impl instead of as a inline in header (In reply to Matt from comment #4) > Created attachment 131359 [details] [review] [review] > patch including static func in impl instead of as a inline in header It's just used once, so why not just... tmp = g_strdup_printf ("/sys/class/%s/%s/device/driver", subsystems[i], device_basename); #if defined HAVE_CANONICALIZE_FILE_NAME path = canonicalize_file_name (tmp); #else path = realpath (tmp, NULL); #endif g_free (tmp); For reference, that's basically what I had in this patch I carry for the openwrt libqmi builds: https://bitbucket.org/aleksander0m/modemmanager-openwrt/src/d694c4c6f92d870885e9f78c6a443d7f74c8254c/libqmi/patches/0002-build-musl-compatibility.patch?at=master&fileviewer=file-view-default Just defaulted it to use realpath() instead of adding more complexity. None of the realpath() limitations really affect us. https://cgit.freedesktop.org/libqmi/commit/?id=6097ad583b89ad692e1d629088185a6728e34e5f |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.