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

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: 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
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..654147484f145620945c118b74b1bd3671319d05 100644
--- a/ports/glibc-compat/include/sys/un.h
+++ b/ports/glibc-compat/include/sys/un.h
@@ -1,3 +1,8 @@
+/*
+ * 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.
+ */
/* olonho */
#ifndef GLIBCEMU_SYS_UN_H
#define GLIBCEMU_SYS_UN_H 1
@@ -9,6 +14,10 @@ struct sockaddr_un {
char sun_path[108];
};
+/* 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 */
/* end of olonho */
Sam Clegg 2015/07/28 00:14:13 Maybe remove these olonho comments too. He used t
zhitingzhu 2015/07/28 02:05:41 Done.
-

Powered by Google App Engine
This is Rietveld 408576698