[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 3/4] lib/posix-libdl: Adapt dlfcn.h


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Wed, 14 Aug 2019 17:56:31 +0300
  • Cc: felipe.huici@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, Andrei Gogonea <andrei.gogonea09@xxxxxxxxx>, sharan.santhanam@xxxxxxxxx, Teodora Serbanescu <teo.serbanescu16@xxxxxxxxx>
  • Delivery-date: Wed, 14 Aug 2019 14:56:56 +0000
  • Ironport-phdr: 9a23:9ALLLhGTKf7kEV+ZzQdV+p1GYnF86YWxBRYc798ds5kLTJ76ps6zbnLW6fgltlLVR4KTs6sC17OM9fm6CCdZvt6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpTEdFQ/iOgVrO+/7BpDdj9it1+C15pbffxhEiCCybL9vMhm6txjdutcSjIdtN6o8yAbCr2dVdehR2W5mP0+YkQzm5se38p5j8iBQtOwk+sVdT6j0fLk2QKJBAjg+PG87+MPktR/YTQuS/XQcSXkZkgBJAwfe8h73WIr6vzbguep83CmaOtD2TawxVD+/4apnVAPkhSEaPDMi7mrZltJ/g75aoBK5phxw3YjUYJ2ONPFjeq/RZM4WSXZdUspUUSFKH4GyYJYVD+cZPehWsZTzqVUNoxW5BwasCuzgxSNHiHLtwa06yv4sHR3c0QA8Hd8DtmnfotXvNKcVVOC41LfFzTLYb/NK2Df97pXDfBY8ofGUQLJ7bM3cxlUoFwPeklWQqIrlMymR1uQQq2ib8vFtWv60i2I9swFxvyOgyt02ionOn48YzE3P+yZhwIstONG1R1N3bcSnHZZQrS2WKZV6T8E4T2xmoCo217ILtYOhcCUJyJkr3QDTZvKJfoSS/x7uW/idLDFlj3x/Yr2/nQy98U24x+35Ucm7zUhFozJektnJqnANzxvT6tWbSvdl/keuxzKP1wfL5+FaJEA7j6vbK5o7zrEsjZofq1zDHjLtl0nslq+WcV0o+umu6+v5frXrvoKQOoBphg3kMakjmtazDfomPgUMRWSW9/yw1Lj58k34RLVKgOc2kq7csJ3COcsbobW5AxNU0oYl8Rq/Cyqm0MwFnXQcMF1FYwiLj5D0O17VOvz4F/C/j0y2kDh33/DGIqHhApLVI3fZlrfuYKx95FBdyAYpwtBf4J1UCrYHIP3tQED9qNjVAwQ2Mwyx2ennCdF92pkCVmKIB6+TKLnSvkOQ5uIzP+mMY5cYuCrjJPgi/fLulmE2mUUGcqaz25sYdmu4Eeh7I0mEYHfhmdgBEWIQsQo/SOzmkkGNUTlWZ3yqRaIz+ik7CJ66DYfEXo2thb2B3CG6Hp1RfWBKE02DHmn2d4qaX/cBcyaSIs56kjwYTritUYAg2g+otAPgzLpnNOXU8DUCtZ3/zNh1+/HTlRYq+Dx6Ecud12CNT3lqkW8SRz82waF/rlB8ylqY16h3neBXFdhJ6PxSSAs1K4PcxfRgC9/uQgLBYsuJSFG+T9W9ATE+VMgxzMUIY0pnANWtlBbD3zaqA7APkbyEHpk0/7na33fvO8l9z2zJ27I7g1Y4X8tFLXemibJn9wjPG47JlF2Ul72rdaQZ2y7N8n2PzWmTvE5GVg5xULvKXWoEa0vQs9v2+kfCQKW1Brg9LARB1J3KFqwfb9zvjFJdAfvuJtnaS2awgHurQwaFwPWLdoW5VX8a2XD2D1MYkgZb2WueKEBqDSC6v2PYSjhzDU/HaFiq6fR07mm8GBxnhzqWZlFsguLmsiUeguaRHrZKhuoJ
  • Ironport-sdr: ivYL1OVOCKXV8g9W1O+Vi9MLeqrgEbU0F27g9hsb//hdd+RO1JUTAKKrGPuUPkWRqx+dAv2h9S 9ERmSvdlpG7w==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Signed-off-by: Andrei Gogonea <andrei.gogonea09@xxxxxxxxx>
Signed-off-by: Teodora Serbanescu <teo.serbanescu16@xxxxxxxxx>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 lib/posix-libdl/include/dlfcn.h | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/lib/posix-libdl/include/dlfcn.h b/lib/posix-libdl/include/dlfcn.h
index 78fb0733..706245a5 100644
--- a/lib/posix-libdl/include/dlfcn.h
+++ b/lib/posix-libdl/include/dlfcn.h
@@ -1,3 +1,29 @@
+/* SPDX-License-Identifier: MIT */
+/* ----------------------------------------------------------------------
+ * Copyright © 2005-2014 Rich Felker, et al.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ----------------------------------------------------------------------
+ */
+/* Taken from musl */
+
 #ifndef        _DLFCN_H
 #define        _DLFCN_H
 
@@ -5,7 +31,7 @@
 extern "C" {
 #endif
 
-#include <features.h>
+/* TODO #include <features.h> */
 
 #define RTLD_LAZY   1
 #define RTLD_NOW    2
@@ -24,7 +50,6 @@ char  *dlerror(void);
 void  *dlopen(const char *, int);
 void  *dlsym(void *__restrict, const char *__restrict);
 
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef struct {
        const char *dli_fname;
        void *dli_fbase;
@@ -33,7 +58,6 @@ typedef struct {
 } Dl_info;
 int dladdr(const void *, Dl_info *);
 int dlinfo(void *, int, void *);
-#endif
 
 #ifdef __cplusplus
 }
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.