Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Unified Diff: ports/glibc-compat/include/sys/un.h

Issue 1260083004: Add needed functions to glibc-compat for pkg (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: fix wrong c++ lib Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/glibc-compat/include/sys/types.h ('k') | ports/glibc-compat/include/sys/unistd.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/glibc-compat/include/sys/un.h
diff --git a/ports/glibc-compat/include/sys/un.h b/ports/glibc-compat/include/sys/un.h
index 673c84b0bb6cfeb6dc9e4e92018861dd5d326819..2a9f994d694b52884e8e39f772b42fed4f726f24 100644
--- a/ports/glibc-compat/include/sys/un.h
+++ b/ports/glibc-compat/include/sys/un.h
@@ -1,4 +1,8 @@
-/* olonho */
+/*
+ * Copyright 2015 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
#ifndef GLIBCEMU_SYS_UN_H
#define GLIBCEMU_SYS_UN_H 1
@@ -9,6 +13,9 @@ struct sockaddr_un {
char sun_path[108];
};
-#endif /* GLIBCEMU_SYS_UN_H */
-/* end of olonho */
+/* pulled from freebsd 10.1 sys/sys/un.h */
+/* actual length of an initialized sockaddr_un */
+#define SUN_LEN(su) \
+ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif /* GLIBCEMU_SYS_UN_H */
« no previous file with comments | « ports/glibc-compat/include/sys/types.h ('k') | ports/glibc-compat/include/sys/unistd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698