Project

General

Profile

Bug #4437 ยป msghdr-xpg42.patch

Igor Pashev, 2013-12-31 11:05 AM

View differences:

uts/usr/src/uts/common/sys/socket.h 2013-08-17 13:32:19.245224087 +0400
338 338
	socklen_t	msg_namelen;		/* size of address */
339 339
	struct iovec	*msg_iov;		/* scatter/gather array */
340 340
	int		msg_iovlen;		/* # elements in msg_iov */
341

  
342
#if defined(_XPG4_2) || defined(_KERNEL)
343 341
	void		*msg_control;		/* ancillary data */
344 342
	socklen_t	msg_controllen;		/* ancillary data buffer len */
345 343
	int		msg_flags;		/* flags on received message */
346
#else
347
	caddr_t		msg_accrights;	/* access rights sent/received */
348
	int		msg_accrightslen;
349
#endif	/* defined(_XPG4_2) || defined(_KERNEL) */
350 344
};
351 345

  
352 346
#if	defined(_KERNEL)
......
433 427
	int		cmsg_type;	/* protocol-specific type */
434 428
};
435 429

  
436
#if defined(_XPG4_2) || defined(_KERNEL)
437 430
#if defined(__sparc)
438 431
/* To maintain backward compatibility, alignment needs to be 8 on sparc. */
439 432
#define	_CMSG_HDR_ALIGNMENT	8
......
441 434
/* for __i386 (and other future architectures) */
442 435
#define	_CMSG_HDR_ALIGNMENT	4
443 436
#endif	/* defined(__sparc) */
444
#endif	/* defined(_XPG4_2) || defined(_KERNEL) */
445 437

  
446
#if defined(_XPG4_2)
447 438
/*
448 439
 * The cmsg headers (and macros dealing with them) were made available as
449 440
 * part of UNIX95 and hence need to be protected with a _XPG4_2 define.
......
478 469
#define	CMSG_LEN(l)							\
479 470
	((unsigned int)_CMSG_DATA_ALIGN(sizeof (struct cmsghdr)) + (l))
480 471

  
481
#endif	/* _XPG4_2 */
482 472

  
483
#ifdef	_XPG4_2
484 473
#ifdef	__PRAGMA_REDEFINE_EXTNAME
485 474
#pragma redefine_extname bind __xnet_bind
486 475
#pragma redefine_extname connect __xnet_connect
......
501 490
#define	getsockopt	__xnet_getsockopt
502 491
#endif	/* __PRAGMA_REDEFINE_EXTNAME */
503 492

  
504
#endif	/* _XPG4_2 */
505 493

  
506 494
#if defined(_XPG4_2) && !defined(_XPG5)
507 495
#ifdef	__PRAGMA_REDEFINE_EXTNAME
    (1-1/1)