chiark / gitweb /
noip.c (do_implicit_bind): Handle `SAME' impbind entries properly.
[preload-hacks] / uopen.c
diff --git a/uopen.c b/uopen.c
index f3887c58523368bc7e8c21b0771f35e52dcce5d4..22b09db5a15cc5cd6eec8cee11ed9c5f13750ddb 100644 (file)
--- a/uopen.c
+++ b/uopen.c
  * the Free Software Foundation; either version 2 of the License, or (at
  * your option) any later version.
  *
- * Preload-hacks distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
+ * Preload-hacks are distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with mLib; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307, USA.
+ * with preload-hacks; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #define _GNU_SOURCE
 #include <sys/stat.h>
 #include <sys/un.h>
 
+#ifndef SUN_LEN
+#  define SUN_LEN (sun) \
+       (strlen((sun)->sun_path) + offsetof(struct sockaddr_un, sun_path))
+#endif
+
 /*----- Import the real versions of functions -----------------------------*/
 
 /* The list of functions to immport. */